HomeLinked List
Linked List
Pointers you rewire in place — reverse, detect cycles, merge.
39 shown
- Reverse Linked ListFlip each next pointer as you walkanimatedEasy
- Linked List CycleFloyd's tortoise & hareanimatedEasy
- Merge Two Sorted ListsZip two sorted lists with a dummy headanimatedEasy
- Practice problems
- Introduction to Singly LinkedListNodes chained by a next pointerEasy
- Insertion at the head of Linked ListPoint the new node at the old headEasy
- Deletion of the head of LLReturn the second nodeEasy
- Find the length of the Linked ListWalk to the end, countingEasy
- Search in Linked ListLinear scan, node by nodeMedium
- Introduction to Doubly LLEach node also points backwardsEasy
- Insert node before head in Doubly Linked ListWire both directions, then move the headEasy
- Delete head of Doubly Linked ListAdvance the head, clear its prevEasy
- Reverse a Doubly Linked ListSwap prev and next at every nodeMedium
- Middle of a LinkedListSlow one step, fast twoEasy
- Reverse a LinkedListFlip each next pointer as you walkanimatedMedium
- Reverse a LLThe same three-pointer flipanimatedMedium
- Detect a loop in LLFloyd: a fast pointer laps a slow oneanimatedMedium
- Find the starting point in LLRestart one pointer at the headanimatedMedium
- Length of loop in LLWalk one lap from the meeting pointanimatedMedium
- Check if LL is palindrome or notReverse the second half and compareMedium
- Segregate odd and even nodes in Linked ListWeave two chains, then join themMedium
- Remove Nth node from the back of the LLTwo pointers, n apartMedium
- Delete the middle node in LLSlow and fast, keeping the predecessorMedium
- Sort LLMerge sort, using the middle splitHard
- Sort a Linked List of 0's 1's and 2'sThree chains, concatenatedMedium
- Find the intersection point of Y LLSwap heads to equalise the walkMedium
- Add one to a number represented by LLReverse, add with carry, reverse backMedium
- Add two numbers in Linked ListWalk both, carrying as you goMedium
- Delete all occurrences of a key in DLLUnlink each match, both directionsHard
- Find Pairs with Given Sum in Doubly Linked ListTwo pointers from both endsMedium
- Remove duplicates from sorted DLLSkip runs of equal valuesHard
- Reverse LL in group of given size KReverse a block, then stitch it backHard
- Rotate a LLClose the ring, then cut itHard
- Flattening of LLMerge the sorted child lists pairwiseHard
- Clone a LL with random and next pointerWeave copies in, then split them outHard
- Add Two NumbersDigit by digit with a running carryMedium
- Palindrome Linked ListReverse the back half and walk bothMedium
- Remove Nth Node From EndA gap of n, then move togetherMedium
- Reorder ListSplit, reverse the tail, interleaveMedium
- Swap Nodes in PairsRelink each pair, keep the predecessorMedium