
Fast and Slow Pointers: Solving the 'Linked List Cycle' Problem
Solve Linked List Cycle with fast and slow pointers in TypeScript, comparing visited‑node storage with Floyd's cycle detection and common mistakes.
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 prep: searching, sorting, caching, scheduling, parsing, and state‑heavy UI logic all rely on algorithmic judgement. A lot of the articles here overlap with LeetCode, but the category is broader than that; it is about learning the techniques that make difficult problems easier to reason about in JavaScript and TypeScript.
Below you will find a subset of articles from my blog specifically about Algorithms. This is an area that I have worked with for many years, and have managed to write about quite a few times. There are thirty‑nine collected together for you below.

Solve Linked List Cycle with fast and slow pointers in TypeScript, comparing visited‑node storage with Floyd's cycle detection and common mistakes.

How to solve Number of Islands with grid traversal, treating the matrix like a graph, marking visited land safely, and reasoning about DFS in TypeScript.

How to solve Longest Substring Without Repeating Characters with sliding window basics, comparing Set and last‑seen‑index approaches in TypeScript.

How to solve Trapping Rain Water with the two‑pointer approach, and the simple invariant that makes the O(n) solution click under interview pressure.

Solve Merge Intervals in TypeScript by sorting ranges, merging overlaps, handling touching intervals, preserving inputs, and avoiding common mistakes.

How to solve Product of Array Except Self without division, using prefix and suffix products to keep the logic linear and interview‑safe in TypeScript.

nth Node from the End of a ListHow to remove the Nth node from the end of a linked list in TypeScript. Here we break down and explore a simple double‑pass and an efficient single‑pass method.

Distinguishing two approaches to detect palindrome numbers: the intuitive string method vs. the optimised mathematical technique, highlighting their merits.

Exploring the 'Find Median of Two Sorted Arrays' problem: Understand its significance in interviews, dive into a TypeScript solution, and test with Cypress.

Decode the mystique of Roman numerals! Discover their structure, learn their significance, and master the art of converting them back to integers in code.

Explore the art of converting integers to Roman numerals. Dive into the ancient numeral system, grasp its structure, and master its modern‑day coding solution.

Dive into the 'Container with Most Water' problem, exploring the efficient two‑pointer technique with a step‑by‑step TypeScript example and analysis.

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 while finding the nearest total efficiently in TypeScript.

Explore LeetCode's 'Add Two Numbers' problem: adding numbers represented as linked lists. Dive into the challenge, TypeScript solution, and its significance.

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.