Explanations, pseudocode, an embedded interactive visualization, implementations in JavaScript, Python, Java and Go, complexity and interview variations.
Reverses an array in place with two pointers: swap the outermost pair, move both pointers inward, and stop when they meet.
Finds two indexes whose values add up to a target in one pass, storing each value's index in a hash map and looking up the complement (target − value).
Inserts a new node at a given position: walk to the node just before the position, point the new node at its successor, then re-link the predecessor to the new node.
A stack is Last-In-First-Out (LIFO): push adds to the top, pop removes from the top. A fixed capacity shows overflow (push when full) and underflow (pop when empty).
A queue is First-In-First-Out (FIFO): enqueue adds at the rear, dequeue removes from the front. This circular-array queue wraps the rear pointer around to reuse freed slots.