
Decode String in TypeScript: Save the Context Before the Bracket
Decode nested strings in TypeScript using explicit stack frames, multi‑digit repeat counts, worked examples, and careful accounting for expanded output costs.
Articles
Algorithms are the repeatable problem‑solving patterns we use when brute force is no longer good enough. In web development they show up far beyond interview preparation, wherever the order or cost of work matters. A lot of my articles here overlap with LeetCode, but the category is broader than that; it is about recognising the techniques that make difficult problems easier to reason about in JavaScript and TypeScript.

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.

Convert Roman numerals to integers in JavaScript, covering subtractive notation, invalid input caveats, and a clear TypeScript implementation.

Convert integers to Roman numerals in JavaScript, covering symbol rules, greedy matching, edge cases, and a clear TypeScript implementation.

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

Solve Container With Most Water in TypeScript using the two‑pointer pattern, with pointer movement, complexity, edge cases, and testable logic explained.

Solve Combination Sum IV in TypeScript by counting final choices, with exact arithmetic, loop‑order counterexamples, and the limits of negative inputs.

Master the 4Sum problem in JavaScript: Explore the two‑pointer technique, solve with ES6/TypeScript, and test using Cypress. Elevate your coding skills.

Solve 3Sum Closest in JavaScript with sorting and two pointers, reducing brute‑force work whilst finding the nearest total efficiently in TypeScript.

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

Count Coin Change II combinations in TypeScript with coin‑first updates, exact intermediate counts, a worked table, and tests that expose ordered counting.

Solve the 3Sum problem in JavaScript with sorting, two pointers, duplicate skipping, Jest coverage, edge cases, and a clear TypeScript implementation.

Solve Longest Substring Without Repeating Characters in JavaScript with a sliding window, unique‑character tracking, and substring return variants.

A simple solution to solve the Valid Palindrome problem in JavaScript using the two‑pointer approach in ES6 and TypeScript, checking alphanumeric characters.

Solve Target Sum in TypeScript by turning signs into subset counts, handling zeroes correctly, and proving why each input position must be counted once.

Work through Partition Equal Subset Sum in TypeScript, including the half‑total reduction, descending updates, duplicate values, and independent tests.