Data Structures and Algorithms with Python
Build the classic data structures yourself in Python (linked lists, stacks, queues, hash maps, trees, heaps and graphs) and the algorithms that use them: recursion, Big O analysis, searching, sorting, graph search, Dijkstra and A*.
- Intermediate level
- 8 modules
- 34 lessons
- 77 tasks and questions
Syllabus
01Nodes and linked listsBuild data structures from nodes: singly linked lists with insertion, traversal and removal, two-pointer techniques, and doubly linked lists.5 lessons
02Stacks and queuesImplement FIFO queues and LIFO stacks on top of nodes, handle overflow and underflow, then use them in practice: postfix evaluation, round-robin scheduling and browser history.4 lessons
03Hash mapsUnderstand hashing, compression, collisions and load factor, then implement a hash map with separate chaining that grows automatically.3 lessons
04RecursionSolve problems by reducing them to smaller copies: base cases and the call stack, branching recursion over nested data, converting recursion to loops, and memoization.4 lessons
05Complexity and searchingDescribe how algorithms scale with Big O, analyze real Python code including the cost of built-in operations and memory, and implement linear search and naive pattern search.4 lessons
06Sorting algorithmsImplement and analyze bubble sort, merge sort and quicksort, measure their work by counting comparisons, and see why Python's built-in sort is the right default.4 lessons
07Trees, searching and heapsModel hierarchies with trees, traverse them breadth-first and depth-first, search sorted data with binary search and binary search trees, and build heaps for priority queues and heapsort.6 lessons
08Graphs and pathfindingRepresent networks as graphs, search them depth-first and breadth-first, find cheapest routes with Dijkstra's algorithm, and steer the search toward a goal with A*.4 lessons