Free lessons · Made by VeraStack Labs
DSA in Rust
Data structures, one working build at a time.
Data structures
Part 1: data structures
Thirteen lessons planned. Three are ready, and the rest are coming next.
- 00Setting up, and how to read these pagescargo new, cargo test, the Playground
- 01Arrays and VecSlices, bounds checks, capacity and length
- 02StringsString and &str, UTF-8, why indexing by number fails
- 03Linked listsBox, Option, and why they are hard in RustComing next
- 04StacksVec as a stackComing next
- 05Queues and dequesVecDeque and ring buffersComing next
- 06Hash maps and setsHashMap, HashSet, the entry APIComing next
- 07Trees and binary search treesOption<Box<Node>> and recursionComing next
- 08Heaps and priority queuesBinaryHeap, and Reverse for a min-heapComing next
- 09Ordered mapsBTreeMap and range queriesComing next
- 10Graphs: representationsVec<Vec<usize>> and indices instead of referencesComing next
- 11TriesNested maps and prefix searchComing next
- 12Union-findPath compression and ranksComing next
How a lesson is built
Seven parts, every time
So you always know where the cost table is.
- 01What it is
- 02The idea
- 03Build it
- 04Standard library
- 05Cost
- 06Practise
- 07Interview notes
Every piece of Rust on these pages is a real file that is compiled and tested before the page is built, so the code you read is the code that ran. Your progress is kept in this browser only. Nothing is sent anywhere.
Made by VeraStack Labs