← Back to TypeScript
Linked Lists
The list you build out of pointers — reverse it, find its cycle with two runners, merge two of them, and lose nothing on the way.
Reverse a linked list in place
intermediateblankComplete the three-pointer reversal — the previous, the current, and the next that keeps the rest alive.
Challenge: the tortoise and the hare
intermediatechallengeDetect whether a linked list loops back on itself — two runners at different speeds, no set, no extra memory.
Challenge: merge two sorted lists
intermediatechallengeSplice two sorted linked lists into one sorted list — one dummy head, one loop, no arrays.
Review: the merge that drops the tail
intermediatereviewA merge of two sorted lists is correct for every input where the lists end together — and silently loses the rest of the longer one. Find the missing line.