Data structures and algorithms
A free DSA course in Python for beginners: Big-O, arrays, linked lists, trees, graphs, sorting and dynamic programming, with interview problems.
Module 1 · Beginner
DSA foundations and complexity
What DSA is, how to measure how fast code runs, and a method for solving any coding problem.
Module 2 · Beginner
Arrays, strings and hashing
The patterns behind most interview questions: two pointers, sliding windows, prefix sums and hash maps.
Module 3 · Beginner
Linked lists, stacks and queues
Data structures built from linked pieces, and the first-in and last-in rules that power them.
- Linked lists in Python
- Reverse a linked list, and other classic problems
- Stacks in Python, with examples
- Queues and deques in Python
- Monotonic stack problems
Module 4 · Intermediate
Sorting and searching
Find things fast and put them in order, and know which algorithm Python uses.
- Binary search explained, with variations
- Bubble, selection and insertion sort
- Merge sort and quick sort
- Sorting in Python: sorted, key and stability
Module 5 · Intermediate
Trees, heaps and graphs
Hierarchies and networks: from binary trees to shortest paths.
- Binary trees and tree traversals
- Binary search trees
- Heaps and priority queues with heapq
- Graphs: representation, BFS and DFS
- Shortest paths with Dijkstra's algorithm
- Tries for word problems
Module 6 · Intermediate
Problem-solving patterns
Strategies for harder problems: try everything smartly, or choose greedily.
- Backtracking: subsets, permutations and N-Queens
- Greedy algorithms, with examples
- Bit manipulation basics
Module 7 · Advanced
Dynamic programming
Solve big problems by remembering the answers to smaller ones.
- Dynamic programming for beginners
- Memoisation vs tabulation
- 1D dynamic programming problems
- 2D dynamic programming: grids and strings
- The knapsack problem
Module 8 · Advanced
Interview preparation
Practise the problems and habits that coding rounds test.
- 75 must-do DSA interview problems
- DSA quick reference for Python
Want to learn this with others?
Join our free Python training, run by the theprogrammers community.