Fetching algorithms...
Fetching algorithms...
Watch key transitions, pointers, and variables update step-by-step.
Read clean, documented implementations across multiple patterns.
Sketch diagrams on an infinite canvas and draft notes directly inline.
nums = [0, 1, 0, 2, 1, 2][0, 0, 1, 1, 2, 2]nums = [2, 0, 1][0, 1, 2]nums = [0, 0, 0][0, 0, 0]nums = [2, 2, 2][2, 2, 2]nums = [1, 1, 1][1, 1, 1]Time Complexity
Space Complexity