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 = [1, 2, 3, 4, 5, 6, 7], k = 3[5, 6, 7, 1, 2, 3, 4]nums = [-1, -100, 3, 99], k = 2[3, 99, -1, -100]nums = [1, 2], k = 3[2, 1]nums = [1, 2, 3], k = 0[1, 2, 3]Time Complexity
Space Complexity