Saturday, November 15, 2014

What is Linked LIST? What are the types of Linked LIST?

Give Gift to Birthday Baby:: Scenario:1

Give Gift to Birthday Baby:: Scenario:2

What is Linked LIST?

A linked list is a data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of a data and a reference (in other words, a link) to the next node in the sequence. Link is a pointer to next node.

Node Structure::

Linked LIST with Multiple node::

Advantages of Linked List::

  1. Linked LIST is dynamic data structure.
  2. Linked LIST can grow and shrink during run time.
  3. Insertion and deletion operation are easier.
  4. Efficient Memory Utilization, i.e no need to pre-allocate  memory.

Disadvantages of Linked List::

  1. Pointer requires extra memory for storage.
  2. No random access. In array if we want to access the nth element, we can access by array[n]. But in Linked LIST, we need to traverse n times.

What are the types of Linked List?

Singly Linked List

Doubly Linked List

Singly Circular Linked List

Doubly Circular Linked List

No comments:

Post a Comment