
LeetCode: Removing the nth Node from the End of a List
Remove the nth node from a linked list in TypeScript. Compare the two‑pass and pointer‑gap approaches, their edge cases, types and linear‑time complexity.
Articles
Data structures are the shapes we choose to organise information so the surrounding code can work with it efficiently. The useful question is not how many structures you can name, but which access or update problem each one solves. That is why these articles overlap naturally with both Algorithms and LeetCode. This category is for the posts where the structure itself is a big part of the lesson, not just a background detail in the final solution.

nth Node from the End of a ListRemove the nth node from a linked list in TypeScript. Compare the two‑pass and pointer‑gap approaches, their edge cases, types and linear‑time complexity.

Build a Time Based Key‑Value Store in TypeScript with append‑only histories and upper‑bound search, covering missing keys, time gaps, and ordering assumptions.

Decode nested strings in TypeScript using explicit stack frames, multi‑digit repeat counts, worked examples, and careful accounting for expanded output costs.

Solve Simplify Path in TypeScript with a component stack, careful handling of dots and root, and the distinction between path text and filesystem resolution.

Implement Insert Delete GetRandom in TypeScript using a dense array and index map, with swap removal, equal sampling chances, and deterministic tests.

Sort an array in TypeScript with stable merge sort, then compare an in‑place heapsort implementation, including space costs, duplicate values, and useful tests.

Build a TypeScript HashMap with separate chaining, deliberate collision tests, and an honest comparison with direct addressing and JavaScript's built‑in Map.

Solve LeetCode Add Two Numbers in TypeScript with linked‑list traversal, carry handling, edge cases, and a clear implementation you can test and extend.