Lab
Benchmark suite
Time and memory for list vs dict vs heap vs graph on the same task.
The structures and algorithms AI systems actually sit on: arrays, hashes, graphs, heaps, and complexity you can measure — taught in Python, aimed at engineering work.
Created by Baljeet Dogra
Lab
Time and memory for list vs dict vs heap vs graph on the same task.
Build
Inverted index plus a heap for top-k — the skeleton of retrieval.
Write
One page: why this structure, what you rejected, where it breaks.
Expand a part for the syllabus. Content stays searchable when closed.
Big-O in practice. Best, average, worst. Why an O(n²) chunker dies on a 50k-page corpus.
Arrays, lists, stacks, queues, dicts and sets. Collisions, load factor, and why your cache is a hash map.
Binary trees, heaps, priority queues. Scheduling jobs and top-k retrieval are the same shape.
BFS, DFS, Dijkstra. Agent graphs and knowledge graphs are not a different subject.
Sorts you should know, selection, and a capstone: an inverted index with measured complexity.
You write Python. You have not yet had to argue for a structure under load.
You need DSA that shows up in interviews and in RAG, not contest puzzles for their own sake.
Related: Python for GenAI · Mathematics for AI
No. You will write real implementations and measure them. Interview-shaped questions appear, but the point is structures you reuse in AI systems.
Enough to implement, profile and write. Not a year of textbook chapters you will not open again.
Six weeks from complexity to a measured mini-index. Create an account to enrol.
Enrol now