All Posts

1582 articles

dsa13 min read

Move Zeroes (LeetCode 283) — Two Pointers, and the Write Count

LeetCode 283 moves every zero to the end of an array in place, keeping the other elements in order. Two pointers do it in one pass — but the problem also asks you to minimise the total number of operations, and that is where the overwrite and swap versions stop being interchangeable.

Read →
dsa4 min read

Plus One — Carry Propagation in Arrays

LeetCode 66 — increment a large integer represented as a digit array, propagating the carry. The deceptively simple FAANG warmup that catches careless coders.

Read →
Page 43 of 317