{} The Go Reference

A Go-first guide

Data Structures & Algorithms, in Go

The structures and techniques every engineer leans on — built and analyzed the Go way. From Big-O to slices, hash tables, trees, graphs and dynamic programming, each page pairs a clear mental model with idiomatic Go you can run right here and the costs you should know by heart.

Your DSA progress

Mark a topic “learned” on its page and watch the bars fill.

Skill map

Learned nodes light up — the glowing one is your next step. Click any node to jump in.

Complexity & Big-O

How to measure cost before you optimize — Big-O for time and space, amortized analysis, and reading the complexity of real Go code.

Linear Structures

The everyday building blocks — arrays and slices, strings, linked lists, stacks, queues and hash tables — and what each operation actually costs.

Trees & Graphs

Hierarchical and networked data — binary search trees, heaps and priority queues, tries, and graph traversal with BFS, DFS and friends.

Algorithms & Patterns

The reusable techniques — sorting, binary search, two pointers and sliding window, recursion and backtracking, dynamic programming and greedy.

Revise

REFERENCE · Reference DSA Cheat-Sheet

A one-page map of the structures and algorithms — their costs, when to reach for each, and the Go stdlib that already implements them. Built for revision and interview prep.

One-page recap · ⏱ 3 min

🐹 Reach for the standard library first

In real Go you rarely hand-roll these — slices, maps, sort, container/heap and container/list cover most needs. We build them from scratch here so the costs and trade-offs are obvious; in production, prefer the battle-tested library version.