DSAWiser

DSA question set · 155 questions

Doubly Linked List DSA Practice Questions

Explore 155 DSA questions in Doubly Linked List. Practice with DSAWiser’s code editor and visualizer.

Doubly Linked ListLinked ListSortingData Structure DesignTreeDynamic ProgrammingString MatchingSliding WindowSerial SimulationComputational GeometryGraphNetwork FlowBacktrackingExact Cover

What’s in this set

The Doubly Linked List collection contains 155 problems: 56 basic, 47 easy, 40 medium, 10 hard, 2 very hard. Choose a question at your current level, or follow the collection’s order below.

Topics in this collection include Doubly Linked List, Linked List, Sorting, Data Structure Design, Tree. Each question shows its own topics and difficulty so you can decide where to begin.

Practice with the code visualizer

  1. Open a question in the editor and read the statement, inputs, and expected output. Predict the result for a small example before writing code.
  2. Write a solution and run the examples. If a result differs from your prediction, reduce the input until you can follow each step.
  3. Step through your code in the visualizer. Use a breakpoint to inspect the state at a specific line, then compare it with your reasoning.

Questions in this set

155 total

Open a question in the editor to read its statement and examples. Sign in to practice.

  1. Create a Doubly Linked List NodeDoubly Linked List · Linked ListBasic
  2. Value of Head NodeDoubly Linked List · Linked ListBasic
  3. Value of Tail NodeDoubly Linked List · Linked ListBasic
  4. Count Nodes in Doubly Linked ListDoubly Linked List · Linked ListBasic
  5. Forward Traversal of Doubly Linked ListDoubly Linked List · Linked ListBasic
  6. Backward Traversal from TailDoubly Linked List · Linked ListBasic
  7. Verify Bidirectional Link ConsistencyDoubly Linked List · Linked ListBasic
  8. Check if Doubly Linked List is EmptyDoubly Linked List · Linked ListBasic
  9. Value of Second Node and Predecessor VerificationDoubly Linked List · Linked ListBasic
  10. Check if Single-Node Doubly Linked ListDoubly Linked List · Linked ListBasic
  11. Search for a Value in Doubly Linked ListDoubly Linked List · Linked ListBasic
  12. Maximum Value in Doubly Linked ListDoubly Linked List · Linked ListBasic
  13. Minimum Value in Doubly Linked ListDoubly Linked List · Linked ListBasic
  14. Count Occurrences of a ValueDoubly Linked List · Linked ListBasic
  15. Get k-th Node from Head (0-indexed)Doubly Linked List · Linked ListBasic
  16. Get k-th Node from Tail (0-indexed)Doubly Linked List · Linked ListBasic
  17. Sum of All Node Values in Doubly Linked ListDoubly Linked List · Linked ListBasic
  18. Find Index of First OccurrenceDoubly Linked List · Linked ListBasic
  19. Count Even Value NodesDoubly Linked List · Linked ListBasic
  20. Count Odd Value NodesDoubly Linked List · Linked ListBasic
  21. Insert Node at Head of Doubly Linked ListDoubly Linked List · Linked ListBasic
  22. Delete Head Node of Doubly Linked ListDoubly Linked List · Linked ListBasic
  23. Insert Node at Tail of Doubly Linked ListDoubly Linked List · Linked ListBasic
  24. Delete Tail Node of Doubly Linked ListDoubly Linked List · Linked ListBasic
  25. Update Value of Head NodeDoubly Linked List · Linked ListBasic
  26. Update Value of Tail NodeDoubly Linked List · Linked ListBasic
  27. Update Value of k-th Node (0-indexed)Doubly Linked List · Linked ListBasic
  28. Check if All Node Values are PositiveDoubly Linked List · Linked ListBasic
  29. Check if Doubly Linked List is Strictly IncreasingDoubly Linked List · Linked ListBasic
  30. Count Nodes Greater Than a ThresholdDoubly Linked List · Linked ListBasic
  31. Compare Two Lists for Identical LengthDoubly Linked List · Linked ListBasic
  32. Compare Two Lists for Identical ElementsDoubly Linked List · Linked ListBasic
  33. Increment All Node Values by OneDoubly Linked List · Linked ListBasic
  34. Check if Head Value Equals Tail ValueDoubly Linked List · Linked ListBasic
  35. Find First Negative Value in Doubly Linked ListDoubly Linked List · Linked ListBasic
  36. Replace All Occurrences of a ValueDoubly Linked List · Linked ListBasic
  37. Sum of Alternate Nodes (Even Indices)Doubly Linked List · Linked ListBasic
  38. Check if Length is EvenDoubly Linked List · Linked ListBasic
  39. Range of List (Max - Min)Doubly Linked List · Linked ListBasic
  40. Count Nodes with Value Equal to IndexDoubly Linked List · Linked ListBasic
  41. Multiply All Node Values by a FactorDoubly Linked List · Linked ListBasic
  42. Check if Any Node Has Value ZeroDoubly Linked List · Linked ListBasic
  43. Second-to-Last Node Value via Prev PointerDoubly Linked List · Linked ListBasic
  44. Insert Node After HeadDoubly Linked List · Linked ListBasic
  45. Count Nodes Strictly Less Than a ThresholdDoubly Linked List · Linked ListBasic
  46. Average of All Node ValuesDoubly Linked List · Linked ListBasic
  47. Convert Array to Doubly Linked ListDoubly Linked List · Linked ListBasic
  48. Check if List Has Adjacent Equal ValuesDoubly Linked List · Linked ListBasic
  49. Insert Node Before TailDoubly Linked List · Linked ListBasic
  50. Clear Doubly Linked ListDoubly Linked List · Linked ListBasic
  51. Count Nodes with Equal Predecessor and SuccessorDoubly Linked List · Linked ListBasic
  52. Count Nodes Dominating All Preceding NodesDoubly Linked List · Linked ListBasic
  53. Deep Copy of Doubly Linked ListDoubly Linked List · Linked ListBasic
  54. Maximum Difference Between Adjacent NodesDoubly Linked List · Linked ListBasic
  55. Parallel Node-Wise Sum of Two ListsDoubly Linked List · Linked ListBasic
  56. Scale Node Values by Distance from HeadDoubly Linked List · Linked ListBasic
  57. Reverse a Doubly Linked ListDoubly Linked List · Linked ListEasy
  58. Delete Node at Index kDoubly Linked List · Linked ListEasy
  59. Insert Node at Index kDoubly Linked List · Linked ListEasy
  60. Check if Doubly Linked List is a PalindromeDoubly Linked List · Linked ListEasy
  61. Find Pairs with Given Sum in Sorted Doubly Linked ListDoubly Linked List · Linked List · SortingEasy
  62. Delete All Occurrences of a ValueDoubly Linked List · Linked ListEasy
  63. Remove Duplicates from Sorted Doubly Linked ListDoubly Linked List · Linked List · SortingEasy
  64. Delete Given Node in O(1) TimeDoubly Linked List · Linked ListEasy
  65. Middle of Doubly Linked ListDoubly Linked List · Linked ListEasy
  66. Insert into Sorted Doubly Linked ListDoubly Linked List · Linked List · SortingEasy
  67. Move Last Node to FrontDoubly Linked List · Linked ListEasy
  68. Merge Two Sorted Doubly Linked ListsDoubly Linked List · Linked List · SortingEasy
  69. Split Doubly Linked List into Two HalvesDoubly Linked List · Linked ListEasy
  70. Swap Head and Tail NodesDoubly Linked List · Linked ListEasy
  71. Delete Alternate NodesDoubly Linked List · Linked ListEasy
  72. Remove Duplicates from an Unsorted Doubly Linked ListDoubly Linked List · Linked ListEasy
  73. Check if Doubly Linked List is CircularDoubly Linked List · Linked ListEasy
  74. Move Minimum Element to HeadDoubly Linked List · Linked ListEasy
  75. Move Maximum Element to TailDoubly Linked List · Linked ListEasy
  76. Segregate Even and Odd Value NodesDoubly Linked List · Linked ListEasy
  77. Interleave Two Doubly Linked ListsDoubly Linked List · Linked ListEasy
  78. Remove Nodes Greater Than a ThresholdDoubly Linked List · Linked ListEasy
  79. Count Triplets with Given Sum in Sorted Doubly Linked ListDoubly Linked List · Linked List · SortingEasy
  80. Find Left Middle Node in Doubly Linked ListDoubly Linked List · Linked ListEasy
  81. Reverse First k Nodes of Doubly Linked ListDoubly Linked List · Linked ListEasy
  82. Smallest Common Element of Two Sorted Doubly Linked ListsDoubly Linked List · Linked List · SortingEasy
  83. Remove Odd Values at Odd IndicesDoubly Linked List · Linked ListEasy
  84. Move All Occurrences of Value to TailDoubly Linked List · Linked ListEasy
  85. Swap k-th Node from Beginning and EndDoubly Linked List · Linked ListEasy
  86. Overlap of Two Forward Ranges in a Doubly Linked ListDoubly Linked List · Linked ListEasy
  87. Valid Palindrome After at Most One DeletionDoubly Linked List · Linked ListEasy
  88. Check for Alternating Parity in Doubly Linked ListDoubly Linked List · Linked ListEasy
  89. Remove All Local PeaksDoubly Linked List · Linked ListEasy
  90. Compress Contiguous Duplicate Blocks by SumDoubly Linked List · Linked ListEasy
  91. Keep Only Positive Nodes in Doubly Linked ListDoubly Linked List · Linked ListEasy
  92. Check if Two Doubly Linked Lists are PermutationsDoubly Linked List · Linked ListEasy
  93. Median of Sorted Doubly Linked ListDoubly Linked List · Linked List · SortingEasy
  94. Reverse the Suffix of a Doubly Linked ListDoubly Linked List · Linked ListEasy
  95. Remove Every k-th Node in Doubly Linked ListDoubly Linked List · Linked ListEasy
  96. Add One via Backward TraversalDoubly Linked List · Linked ListEasy
  97. Split Doubly Linked List at Position kDoubly Linked List · Linked ListEasy
  98. Segregate 0s, 1s, and 2s in Doubly Linked ListDoubly Linked List · Linked ListEasy
  99. Delete N Nodes After M Nodes in Doubly Linked ListDoubly Linked List · Linked ListEasy
  100. Construct 2D Doubly Linked GridDoubly Linked List · Linked ListEasy
  101. Double a Number via In-Place Backward PassDoubly Linked List · Linked ListEasy
  102. Multiply Number by Single Digit In-PlaceDoubly Linked List · Linked ListEasy
  103. Bidirectional Move-to-Front Doubly Linked List with Cost TrackingDoubly Linked List · Linked ListEasy
  104. Pairwise Swap Nodes in Doubly Linked ListDoubly Linked List · Linked ListMedium
  105. Rotate Doubly Linked List by k PlacesDoubly Linked List · Linked ListMedium
  106. Partition Doubly Linked List Around Value XDoubly Linked List · Linked ListMedium
  107. Flatten a Multilevel Doubly Linked ListDoubly Linked List · Linked ListMedium
  108. LRU Cache with Sentinel Doubly Linked ListDoubly Linked List · Linked List · Data Structure DesignMedium
  109. Design Browser HistoryDoubly Linked List · Linked List · Data Structure DesignMedium
  110. Design Front Middle Back QueueDoubly Linked List · Linked List · Data Structure DesignMedium
  111. Reorder Doubly Linked ListDoubly Linked List · Linked ListMedium
  112. Sort Doubly Linked List using Merge SortDoubly Linked List · Linked List · SortingMedium
  113. Convert Binary Search Tree to Circular Doubly Linked ListDoubly Linked List · Linked List · TreeMedium
  114. Remove Duplicates from Sorted Doubly Linked List IIDoubly Linked List · Linked List · SortingMedium
  115. Reverse Doubly Linked List in Groups of Size kDoubly Linked List · Linked ListMedium
  116. Insertion Sort for Doubly Linked ListDoubly Linked List · Linked List · SortingMedium
  117. Design Text Editor CursorDoubly Linked List · Linked List · Data Structure DesignMedium
  118. Find Quadruplets with Given Sum in Sorted Doubly Linked ListDoubly Linked List · Linked List · SortingMedium
  119. Longest Palindromic Sublist in Doubly Linked ListDoubly Linked List · Linked ListMedium
  120. Convert Sorted Doubly Linked List to Balanced BSTDoubly Linked List · Linked List · Sorting · TreeMedium
  121. QuickSort on Doubly Linked ListDoubly Linked List · Linked List · SortingMedium
  122. Split Doubly Linked List in PartsDoubly Linked List · Linked ListMedium
  123. Remove Nodes with Greater Value on Right via Backward PassDoubly Linked List · Linked ListMedium
  124. Critical Points and Distances in Doubly Linked ListDoubly Linked List · Linked ListMedium
  125. Merge Nodes in Between Zeros in Doubly Linked ListDoubly Linked List · Linked ListMedium
  126. Reverse Alternate Groups of k Nodes in Doubly Linked ListDoubly Linked List · Linked ListMedium
  127. Add Two Numbers via Direct Backward PassDoubly Linked List · Linked ListMedium
  128. Subtract Two Numbers via Direct Backward PassDoubly Linked List · Linked ListMedium
  129. Rearrange Doubly Linked List in Zig-Zag PatternDoubly Linked List · Linked ListMedium
  130. Rearrange Doubly Linked List in Max-Min OrderDoubly Linked List · Linked ListMedium
  131. Circular Doubly Linked List Josephus EliminationDoubly Linked List · Linked ListMedium
  132. Merge k Sorted Doubly Linked ListsDoubly Linked List · Linked List · SortingMedium
  133. Reverse Nodes in Even Length Groups on Doubly Linked ListDoubly Linked List · Linked ListMedium
  134. Time-To-Live (TTL) Ordered Cache with Doubly Linked ListDoubly Linked List · Linked List · Data Structure DesignMedium
  135. Continuous Stream Median Tracker using Doubly Linked ListDoubly Linked List · Linked List · Data Structure DesignMedium
  136. Maximum Subsegment Sum with At Most One Node DeletionDoubly Linked List · Linked List · Dynamic ProgrammingMedium
  137. KMP Sublist Pattern Matching on Doubly Linked ListDoubly Linked List · Linked List · String MatchingMedium
  138. Merge k Sorted Circular Doubly Linked ListsDoubly Linked List · Linked List · SortingMedium
  139. Iterative Bottom-Up Merge Sort on Doubly Linked ListDoubly Linked List · Linked List · SortingMedium
  140. In-Place Binary Radix Sort on Doubly Linked ListDoubly Linked List · Linked List · SortingMedium
  141. Sublist Anagram Search on Doubly Linked ListDoubly Linked List · Linked List · Sliding WindowMedium
  142. Reverse Alternating Blocks of Sizes k and mDoubly Linked List · Linked ListMedium
  143. Serial Doubly Linked Set with Observable Deletion MarksDoubly Linked List · Linked List · Serial SimulationMedium
  144. LFU (Least Frequently Used) CacheDoubly Linked List · Linked List · Data Structure DesignHard
  145. All O(1) Data StructureDoubly Linked List · Linked List · Data Structure DesignHard
  146. Reverse Nodes in k-Group on Doubly Linked ListDoubly Linked List · Linked ListHard
  147. Minimum Cuts for Palindromic Partitioning of Doubly Linked ListDoubly Linked List · Linked List · Dynamic ProgrammingHard
  148. Doubly-Connected Edge List (DCEL / Half-Edge Data Structure)Doubly Linked List · Linked List · Data Structure Design · Computational GeometryHard
  149. Unrolled Doubly Linked Deque with Block RebalancingDoubly Linked List · Linked List · Data Structure DesignHard
  150. Deterministic Doubly Linked Express Set with Rebuilt LevelsDoubly Linked List · Linked ListHard
  151. Doubly Linked Character Rope with Lazy ReversalsDoubly Linked List · Linked List · Data Structure DesignHard
  152. Dynamic Circular Residual Edge Network with Twin PointersDoubly Linked List · Linked List · Data Structure Design · Graph · Network FlowHard
  153. Bit-Packed Relative-Offset Doubly Linked ArenaDoubly Linked List · Linked List · Data Structure DesignHard
  154. Knuth's Dancing Links (DLX) with Primary and Secondary ColumnsDoubly Linked List · Linked List · Backtracking · Exact CoverVery hard
  155. Fully Persistent Doubly Linked List via Fat-Node MethodDoubly Linked List · Linked List · Data Structure DesignVery hard