What are Linked Lists
- Linear dynamic Data Structure
- Expensive to maintain in comparison to arrays in terms of insertion and deletion
- comprises nodes
- last element points to null
- can grow and shrink on demand
- made of 2 items of data and reference to the next node
MAJOR DISADVANTAGE OF LINKED LIST - O(n) for access to an element in the worst case.
Basic Operations
- traverse linked list
- push
- pop
- insertAtFirst
- deleteByIndex
Top comments (0)