Linked lists interview questions

Chains of links: turning them around, fast and slow pointers, the placeholder head, and when a chain beats a Python list.

5 quick facts

– interview-ready · 10 questions in this topic

– of 10 tried

Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.

Questions

  1. How linked-list questions give you the chainPredict
  2. Turn a chain of links aroundOrder the steps
  3. Does the chain loop back on itself?Pick the fix
  4. Drop the k-th link from the endPredict
  5. Weave two sorted chains into oneFill the blank
  6. Fold a chain: first, last, second, second-lastPredict
  7. Sum two numbers stored digit by digitPredict
  8. Does a chain read the same backwards?Pick the fix
  9. The placeholder head trickSpot the bug
  10. When a chain beats a Python listPick the fix

Practise this topic

Flashcards · 20

Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.

Quick quiz · 10 questions

One exercise per question, checked as you go. Needs JavaScript.

Mock interview · 2 sets

Timed, out loud, then tick what you covered. Needs JavaScript.

Fix this PR · 1 review

Review a diff like a senior: flag the lines you'd comment on. Needs JavaScript.

Quick facts

Recall the answer first, then tap Show to check.

Sources: Topic outline informed by the Tech Interview Handbook by Yangshun Tay and the NeetCode 150 pattern grouping by neetcode-gh, both MIT licensed. Every problem, solution and explanation is written by Best Latest Apps. Credits and license