Skip to main content

DSA pattern

Linked List

Linked list problems test your ability to manipulate pointers. Key techniques include fast/slow pointers for cycle detection, dummy nodes for edge cases, and in-place reversal without extra space.

When to use

5 signals
  1. 01Cycle detection in lists
  2. 02Finding the middle element
  3. 03Reversing lists or sublists
  4. 04Merging sorted lists
  5. 05Removing nth node from end

In interviews, call out the pattern early. It helps interviewers follow your reasoning and keeps your implementation focused. After solving, explain tradeoffs in plain language: why this approach is efficient, where it can break, and what edge cases you would test first.

Practice problems

4 listed
  1. 01Reverse Linked ListPractice →
  2. 02Linked List CyclePractice →
  3. 03Merge Two Sorted ListsPractice →
  4. 04Remove Nth From EndPractice →

Build a review loop

Treat each pattern as a repeating cycle, not a one-time read. Solve a fresh problem today, revisit the same pattern in 2-3 days, and run one timed attempt at the end of the week. This turns short-term familiarity into reliable recall for live interviews.

When reviewing, re-derive the core steps from scratch before checking a reference solution. If you can explain the state transitions and edge cases clearly, you are much more likely to execute well under interview pressure.