Linked List

Palistha
May 8, 2022

--

Linked lists are the set of nodes that are linked. An element in a linked list is called a node.

Nodes contain two-item

  1. Value of data

2. A pointer that points to the next node

linked list

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…

--

--

Palistha
Palistha

Written by Palistha

Learning and Sharing Everyday

No responses yet