Data structures decide how your data is stored; algorithms decide what you do with it. Together they’re the difference between a list that scrolls smoothly and one that freezes, and between a search that takes milliseconds and one that takes minutes.

They’re also the backbone of technical interviews. This guide starts with the containers you use every day and works up to the clever structures that power search engines, maps, and blockchains.

The new articles use Swift 5.7-compatible examples and dates from January 2023 through September 2025. Their language features, framework APIs, and pinned dependencies were available by those dates. Existing linked articles keep their original publication dates. The sorting comparison distinguishes the Swift 5.8 documentation guarantee for stable sorting from earlier implementation behavior.

Each topic develops a working implementation or a worked analysis, explains its correctness assumptions and complexity, and includes boundary cases and exercises. Equations and diagrams support the reasoning. The arrays article covers both arrays and dictionaries; the linked-list article develops persistent lists and queues, and the binary-search-tree article includes persistent update semantics. Dedicated hash-table, queue, and trie articles extend those foundations.

Article available Coming soon

1. Measuring Performance

2. Elementary Data Structures

3. Sorting

4. Trees

5. Graphs

6. Advanced Topics

7. Practice

The best way to learn algorithms is to solve problems with them:

Up next

Design Patterns

This guide grows with the blog: new articles are linked here as soon as they're published. Missing something? Let me know.

← Back to all roadmaps