Interview preparation course

Linked List

A linked list is a relatively simple data structure because problems based on it are very well known and give away the hint that you have to use a linked list.

In this lesson, we will understand the recursive nature of the linked list and how it is implemented in Java. The lesson is divided into three parts, in the first part, we work on problems which require traversal of the list but no modification. In the second part, we solve problems that require modification of the list. In the last part, we solve problems that involve working with more than one list.

Problem set

  1. Find the length of linked
  2. Find the middle of the linked list
  3. Nth node from the end
  4. Loop in a linked list
  5. Is linked list palindrome?
  6. Reverse a linked list
  7. Reverse two nodes in a linked list
  8. Reverse K alternate nodes
  9. Add one to a linked list
  10. Merge two sorted linked lists
  11. Merge K sorted linked lists
  12. Add two numbers represented by linked lists

Leave a Reply

Your email address will not be published. Required fields are marked *