Doubly linked list problems

Get FREE domain for 1st year and build your brand new site

In this article, we have listed important Problems on Linked Lists which you must practice for Coding Interviews and listed introductory and background topics on Linked Lists as well. You must bookmark this page and practice all problems listed.

Table of Contents:

  1. Introductory topics in Linked List with Implementation [7]
  2. Types of Linked Lists [7]
  3. Practice Coding Problems on Linked List [50+] [Important]
  4. Research papers on Linked Lists [5]

Following is the list of Linked List Problems:

Basic operations in a Linked List:

These are the types of Linked Lists that are used in practice:

Some extra Introductory topics:

  • Applications of Linked list
  • Array vs Linked Lists

These are Practice Coding Problems on Linked List which you must learn and practice to ace all problems in your Coding Interview at companies like Google [click on the topic to go to the respective article where the solution is explained in depth with implementation]:

With this article at OpenGenus and the practice of all the topics mentioned, you must have a very strong hold on Linked Lists and will be able to crack any problem.

A linked list is a linear data structure where each element is a separate object.
Linked list elements are not stored at contiguous location; the elements are linked using pointers.

Each node of a list is made up of two items - the data and a reference to the next node. The last node has a reference to null. The entry point into a linked list is called the head of the list. It should be noted that head is not a separate node, but the reference to the first node. If the list is empty then the head is a null reference.

Linked List Representation

// Linked list example in C/C++ // A linked list node struct ListNode { int val; struct ListNode *next; };

// Linked list example in Java // Linked list class class ListNode { // head of list Node head; // Node class class Node { int val; Node next; // Constructor to create a new node Node[int v] { val = v; } } }

# Linked list example in Python # Node class class Node: # Function to initialize the node object def __init__[self, v]: self.val = v # Assign value self.next = None # Initialize next as null # Linked List class class ListNode: # Function to initialize the Linked List def __init__[self]: self.head = None

Practice Problems on Linked List
Recent Articles on Linked List

A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers as shown in the below image:

In simple words, a linked list consists of nodes where each node contains a data field and a reference[link] to the next node in the list.

Topics :

  • Singly Linked List
  • Circular Linked List
  • Doubly Linked List

Singly Linked List :

More >>

Circular Linked List :

More >>

Doubly Linked List :

More >>

Misc :

Quick Links :

If you still need more assistance with your placement preparation, have a look at our Complete Interview Preparation Course. The course has been designed by our expert mentors to help students crack the coding interview of top product or service-based organizations . You get access to premium lectures, 200+ coding questions bank, resume building tips, and lifetime access to the course content. So to make sure that your next programming interview doesn’t feel like an interrogation, enroll in Complete Interview Preparation and give a boost to your placement preparation.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Doubly Linked List

  • Last Updated : 25 May, 2018

Recent articles on Doubly Linked List

  1. Doubly Linked List Introduction and Insertion
  2. Delete a node in a Doubly Linked List
  3. Reverse a Doubly Linked List
  4. The Great Tree-List Recursion Problem.
  5. Copy a linked list with next and arbit pointer
  6. QuickSort on Doubly Linked List
  7. Swap Kth node from beginning with Kth node from end in a Linked List
  8. Merge Sort for Doubly Linked List
  9. Create a Doubly Linked List from a Ternary Tree
  10. Find pairs with given sum in doubly linked list
  11. Insert value in sorted way in a sorted doubly linked list
  12. Delete a Doubly Linked List node at a given position
  13. Count triplets in a sorted doubly linked list whose sum is equal to a given value x
  14. Remove duplicates from a sorted doubly linked list
  15. Delete all occurrences of a given key in a doubly linked list
  16. Remove duplicates from an unsorted doubly linked list
  17. Sort the biotonic doubly linked list
  18. Sort a k sorted doubly linked list
  19. Convert a given Binary Tree to Doubly Linked List | Set
  20. Program to find size of Doubly Linked List
  21. Sorted insert in a doubly linked list with head and tail pointers
  22. Large number arithmetic using doubly linked list
  23. Rotate Doubly linked list by N nodes
  24. Priority Queue using doubly linked list
  25. Reverse a doubly linked list in groups of given size
  26. Sorted merge of two sorted doubly circular linked lists
  27. Reverse a Doubly Linked List
  28. Find the largest node in Doubly linked list
  29. Insertion Sort for Doubly Linked List
  30. Delete a node in a Doubly Linked List
  31. Memory efficient doubly linked list
  32. Extract Leaves of a Binary Tree in a Doubly Linked List
  33. Merge Two Balanced Binary Search Trees
  34. Convert a Binary Tree into Doubly Linked List in spiral fashion
  35. Check if a doubly linked list of characters is palindrome or not
  36. XOR Linked List – A Memory Efficient Doubly Linked List
  37. Convert a given Binary Tree to Doubly Linked List

Quick Links :

  • ‘Practice Problems’ on Linked List
  • ‘Videos’ on Linked List
  • ‘Quizzes’ on Linked List
  • Ask a Question on ‘Linked List’

Video liên quan

Chủ Đề