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).
22 STAGES
☆☆☆☆☆ Clear any 5 stages to beat this world, or all 22 for 100%.
EASY2:00Two Sum
Hash mapLC 1▶ START
EASY2:07Valid Parentheses
StackLC 20▶ START
EASY2:05Binary Search
Binary searchLC 704▶ START
EASY1:59Linked List Cycle
Fast and slow pointersLC 141▶ START
EASY2:03Intersection of Two Linked Lists
Linked listLC 160▶ START
MEDIUM2:04Find the Duplicate Number
Fast and slow pointersLC 287▶ START
EASY2:06Reverse Linked List
Linked listLC 206▶ START
EASY1:57Merge Two Sorted Lists
Linked listLC 21▶ START
MEDIUM2:07Reorder List
Linked listLC 143▶ START
EASY2:02Palindrome Linked List
Fast and slow pointersLC 234▶ START
MEDIUM2:06Remove Nth Node From End of List
Two pointersLC 19▶ START
MEDIUM2:07Add Two Numbers
Linked listLC 2▶ START
EASY2:11Contains Duplicate
Hash setLC 217▶ START
EASY2:08Remove Duplicates from Sorted Array
Two pointersLC 26▶ START
EASY2:02Move Zeroes
Two pointersLC 283▶ START
EASY2:04Merge Sorted Array
Two pointersLC 88▶ START
EASY2:07Valid Anagram
CountingLC 242▶ START
EASY2:10Ransom Note
Hash mapLC 383▶ START
EASY2:10Isomorphic Strings
Hash mapLC 205▶ START
EASY2:12Valid Palindrome
Two pointersLC 125▶ START
EASY2:10Roman to Integer
Hash mapLC 13▶ START
EASY2:11Majority Element
CountingLC 169▶ START