WORLD 1
WARM-UP
Lookups, stacks, halving and two runners: the moves everything else is built on.
STAGE 0 Warm-up tutorial
0:00 / 0:00
The move
Learn how work grows with the input (Big O), then reach for a hash map: it answers "have I seen this?" in one hop, so one pass can replace comparing every pair. Stacks, halving and two runners on a linked list round out the toolbox.
- Spot it
- You're comparing every pair, matching brackets, searching a sorted list, or walking a linked list.
- Cost
- One pass with a hash map is O(n) time and O(n) space; halving a sorted list is O(log n).
15 STAGES Warm-up problems
☆☆☆☆☆ Clear 5 to finish this world.
EASY1:04Two Sum
Hash mapLC 1▶ START
EASY1:36Valid Parentheses
StackLC 20▶ START
EASY1:39Binary Search
Binary searchLC 704▶ START
EASY1:25Linked List Cycle
Fast and slow pointersLC 141▶ START
MEDIUM1:37Find the Duplicate Number
Fast and slow pointersLC 287▶ START
EASY1:36Reverse Linked List
Linked listLC 206▶ START
EASY1:26Merge Two Sorted Lists
Linked listLC 21▶ START
MEDIUM1:38Reorder List
Linked listLC 143▶ START
EASY1:38Palindrome Linked List
Fast and slow pointersLC 234▶ START
MEDIUM1:38Remove Nth Node From End of List
Two pointersLC 19▶ START
MEDIUM1:38Add Two Numbers
Linked listsLC 2▶ START
EASY1:22Contains Duplicate
Hash setLC 217▶ START
EASY1:29Valid Anagram
CountingLC 242▶ START
EASY1:33Valid Palindrome
Two pointersLC 125▶ START
EASY1:49Roman to Integer
Hash mapLC 13▶ START