Skip to main content

Theory

Linked List Representation

1. Singly Linked List (Node Class)

Singly Linked List 1

2. Singly Linked List (Linked List Class)

Singly Linked List 2

3. Doubly Linked List (DLLNode Class)

Doubly Linked List 1

4. Doubly Linked List (DLL Class)

Doubly Linked List 2

Common Operations

ctd.

Problems

Solution to All Linked List solutions Github

Easy Problems

  1. Inserting a node in LinkedList
  2. Deleting a node in LinkedList
    2.2. Deleting a node(front,middle, end) in LinkedList
  3. Find the length of the linkedlist
  4. Search an element in the LL

Doubly Linked List

  1. Insert a node in DLL
  2. Delete a node in DLL
  3. Reverse a DLL

Medium Problems

  1. Middle of a LinkedList [TortoiseHare Method]
  2. Reverse a LinkedList [Iterative]
  3. Reverse a LL [Recursive]
  4. Detect a loop in LL
  5. Find the starting point in LL
  6. Length of Loop in LL
  7. Check if LL is a palindrome or not
  8. Segregate odd and even nodes in LL
  9. Remove Nth node from the back of the LL
  10. Delete the middle node of LL
  11. Sort LL
  12. Sort a LL of 0’s 1’s and 2’s by changing links
  13. Find the intersection point of Y LL
  14. Add 1 to a number represented by LL
  15. Add 2 numbers in LL

Doubly Linked List

  1. Delete all occurrences of a key in DLL
  2. Find pairs with the given sum in DLL
  3. Remove duplicates from sorted DLL
  4. Add 2 numbers in a DLL

Hard Problems

  1. Reverse LL in group of given size K
  2. Rotate a LL
  3. Flattening of LL
  4. Clone a Linked List with random and next pointer