Linked lists are the set of nodes that are linked. An element in a linked list is called a node.
Nodes contain two-item
- Value of data
2. A pointer that points to the next node
The first node of the linked list is called the head. And the last node of the linked list is called the tail.
How do we know that a node is the last node?
The pointer of the last node points to null. Null means end of linked list.
Pointer
Pointers are addresses/references to another node in the memory.
Code obj1 = {A: true};Obj2 = obj1; // reference to object.
to be continued…