
Implementing a Trie in TypeScript: Solving 'Implement Trie (Prefix Tree)'
Implement a Trie prefix tree in TypeScript with Map‑based nodes, insert, search, startsWith, shared prefixes, complexity, and alternative child storage.
Articles
LeetCode is a useful prompt for practising algorithmic judgement, but a finished answer is not much use without the route to it. My walkthroughs concentrate on recognising the pattern, rejecting the tempting brute‑force approach, and explaining the solution in JavaScript or TypeScript.

Implement a Trie prefix tree in TypeScript with Map‑based nodes, insert, search, startsWith, shared prefixes, complexity, and alternative child storage.

Solve Binary Tree Zigzag Level Order Traversal with breadth‑first search, level sizing, alternating output order, and TypeScript implementation details.

Solve Binary Tree Level Order Traversal with breadth‑first search in TypeScript, using a queue, level sizing, edge cases, and cleaner iteration.

Solve Subarray Sum Equals K with prefix sums and a hash map in TypeScript, including negative numbers, count storage, and why sliding window fails.

Solve Word Search with backtracking in JavaScript, covering recursive path exploration, visited state, pruning, restoration, and grid trade‑offs.

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

Solve Single Number in TypeScript with XOR bit manipulation, comparing hash maps, constant extra space, duplicate cancellation, and why the trick works.

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.

Compare horizontal and vertical scanning for Longest Common Prefix in TypeScript, including complexity, edge cases and when each method is clearer.

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 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.

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

Find the median of two sorted arrays in JavaScript, from a simple merge approach to edge cases and the logarithmic approach interviewers often expect.

Validate mixed parentheses and brackets in TypeScript with a stack, check nesting order, and see why separate counters and two pointers are not enough.

An exploration of solutions to the 'Letter Combinations of Phone Number' problem using front‑end and TypeScript: recursion, backtracking, and iteration.