Free beta: 60 days of full access, no card needed.84 seats leftSign up free

We use necessary cookies to run the site (sign-in and language). If you accept, we also load Google Analytics to see which pages are used, and Google reCAPTCHA to keep spam off the contact and bug-report forms. Privacy policy

Articles on data structures and algorithms

The AlgoPath blog has 37 articles on data structures, algorithms and coding interview prep, written for developers without a CS degree. Many take one pattern at a time, with code and a worked example. The rest cover how to study and how to interview.

How to prepare

Binary search tree in Python: the rule, O(h) operations and two interview problems

Left smaller, right larger, for every node. The operation table, Python code, Validate BST with bounds, k-th smallest, lowest common ancestor in a BST and the mistakes.

2026-11-04

Algorithms step by step

The frequency map pattern

A frequency map stores each value with the number of times it appears. One pass builds it, and four common problems fall out.

2026-11-03

How to prepare

Memoization in Python: lru_cache, when it helps and how it differs from a table

A dictionary in front of a recursive function turns 2ⁿ into n. When it works, Python code with lru_cache and by hand, Unique Paths, Word Break, bottom-up comparison and the mistakes.

2026-11-01

How to prepare

Inorder, preorder, postorder and level order: which traversal for which problem

The four orders on one tree, the table that says which to pick, recursive and iterative Python code, height and diameter, Right Side View and the mistakes.

2026-10-30

How to prepare

Merge intervals: sort by start, one pass, and the four problems around it

Sort by start, then extend the last interval or open a new one. Trigger words, Python code for Merge and Insert Interval, Meeting Rooms II, Non-overlapping Intervals and the mistakes.

2026-10-28

Algorithms step by step

How does a hash table work

A hash table turns a key into an array index, and that one step explains every rule you were told to follow. Constant time is an average.

2026-10-27

How to prepare

Search in a rotated sorted array: why one half is always sorted

How binary search survives a rotation. The one comparison that finds the sorted half, Python code for the target and the minimum, a traced run, duplicates and the mistakes.

2026-10-25

How to prepare

BFS vs DFS: how to choose, Python code for graphs and grids, Number of Islands

One question decides it: do you need the shortest path? The choice table, trigger words, Python code for adjacency lists and grids, Number of Islands and the mistakes.

2026-10-23

How to prepare

Dynamic programming explained: state, transition, base and three worked problems

How to spot a DP problem, the three sentences to say before coding, bottom-up vs top-down, Python code for Climbing Stairs, Coin Change and House Robber, and the mistakes.

2026-10-21

All articles