Docsity

Understanding Linked Lists: Singly vs Doubly Linked List, Cheat Sheet of Materials science

Toggle sidebar
bg1
1. Define
The linked list is one of the most important data structures to learn while preparing for
interviews. Having a good grasp of Linked Lists can be a huge plus point in a coding
interview.
Singly Linked List Introduction
A singly linked list is the kind of linked list, in which a node has two fields:
data
next
The data field stores the data or the information, and the next field stores the address of
the next node.
Doubly Linked List Introduction
A doubly linked list is the kind of linked list, in which a node has three fields:
data
next
previous
The data field stores the data or the information and the next field stores the address of
the next node and the previous field stores the address of the previous node.
2.

Partial preview of the text

Download Understanding Linked Lists: Singly vs Doubly Linked List and more Cheat Sheet Materials science in PDF only on Docsity!

1. Define The linked list is one of the most important data structures to learn while preparing for interviews. Having a good grasp of Linked Lists can be a huge plus point in a coding interview. Singly Linked List Introduction A singly linked list is the kind of linked list, in which a node has two fields:  data  next The data field stores the data or the information, and the next field stores the address of the next node. Doubly Linked List Introduction A doubly linked list is the kind of linked list, in which a node has three fields:  data  next  previous The data field stores the data or the information and the next field stores the address of the next node and the previous field stores the address of the previous node. 2.