Linked list programs

Linked list programs
Image credit —Educative

What is a linked list data structure?

How to solve linked list based Coding Problems?

Linked list programs
Introduction to Algorithms

20+ Frequently asked linked list Problems from Coding Interviews

  1. How do you find the middle element of a singly linked list in one pass? (solution)
  2. How do you check if a given linked list contains a cycle? How do you find the starting node of the cycle? (solution)
  3. How do you find the third node from the end in a singly linked list? (solution)
  4. How do you find the sum of two linked lists using Stack? (solution)
  5. How do you reverse a linked list in place? (solution)
  6. How to add an element in the middle of the linked list? (solution)
  7. How do you sort a linked list in Java? (solution)
  8. What is the difference between the array and linked list? (answer)
  9. How to remove Nth Node from the end of a linked list? (solution)
  10. How to merge two sorted linked lists? (solution)
  11. How to convert a sorted list to a binary search tree? (solution)
  12. Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. (solution)
  13. How to remove duplicates from a sorted linked list? (solution)
  14. How to find the node at which the intersection of two singly linked lists begins. (solution)
  15. How to check if a given linked list is a palindrome? (solution)
  16. How to remove all elements from a linked list of integers which match with given value? (solution)
  17. How do you reverse a linked list? (solution)
  18. How do you reverse a singly linked list without recursion? (solution)
  19. How are duplicate nodes removed in an unsorted linked list? (solution)
  20. How do you find the length of a singly linked list? (solution)
Linked list programs

Useful Resources for Coding Interviews

Now You’re Ready for the Coding Interview

Closing Notes

Other Algorithms Articles from Medium you may like