Getting Started
A beginner-friendly guide to algorithms and data structures, with worked explanations in Python and TypeScript
This guide covers 56 problems across 10 topics. Every page follows the same structure — problem, intuition, approach, animated walkthrough, code in both languages, complexity, and edge cases — because the goal is understanding why a solution works, not memorising what it is.
What Makes This Different
Intuition before code
Every page explains the insight that makes the fast solution possible, usually with the naive approach shown first so you can see what changed.
Python and TypeScript
Both languages for every problem, with the traps that differ between them called out explicitly.
Animated walkthroughs
Step through the algorithm frame by frame and watch the pointers, stacks and maps change.
Edge cases named
The empty input, the off-by-one, the tie — the cases that separate a passing solution from a correct one.
Where to Start
New to this?
Read Patterns first. It maps problem wording to technique, and once you can recognise the pattern, most problems stop being unfamiliar.
Then work through Two Sum, Valid Parentheses and Binary Search. Those three cover hash maps, stacks and the halving idea — the foundations for nearly everything else.
Topics
Data Structures
Arrays
18 problems — two pointers, sliding windows, prefix sums, hash maps
Strings
17 problems — counting, normalisation, matching, simulation
Linked Lists
5 problems — pointer rewiring, fast & slow pointers, dummy heads
Stacks & Queues
4 problems — nesting, undo, deferred evaluation
Trees
2 problems — DFS and BFS traversal
Graphs
1 problem — representation and degree counting
Techniques
Binary Search
3 problems — exact matches, boundaries, and searching without an array
Dynamic Programming
1 problem — overlapping subproblems and space optimisation
Greedy
4 problems — local choices, and proving they are globally safe
Design
1 problem — combining structures to hit complexity targets
How Each Page Is Organised
Problem statement
With worked examples, and the constraint that actually shapes the solution called out.
Intuition
The naive approach, then the insight that improves on it — and why the insight is valid.
Approach and walkthrough
Numbered steps, plus an interactive visualisation you can step through frame by frame.
Solution
Python and TypeScript side by side, with comments on the lines that are easy to get wrong.
Complexity and edge cases
What it costs, and the inputs that break a nearly correct solution.
About
Built by Abdullah Al Hommada — a pharmacist turned full-stack developer, writing the explanations he wishes he had found when starting out.