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::
- Linked LIST is dynamic data structure.
- Linked LIST can grow and shrink during run time.
- Insertion and deletion operation are easier.
- Efficient Memory Utilization, i.e no need to pre-allocate memory.
Disadvantages of Linked List::
- Pointer requires extra memory for storage.
- 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.
No comments:
Post a Comment