Home›DSA in Python Tutorial
Free course
DSA in Python Tutorial
Learn data structures and algorithms in Python from zero, one small and easy step at a time. Every idea is explained in simple words, and every example is real Python code with its real output.
Course contents
Every lesson has its own page with the explanation, code you can copy, the real output, screenshots from the video, and a link that jumps straight to that moment in the video.
1. Getting Started
2. Measuring Speed
- Counting Steps3:26
- Big O Notation4:33
- Big O Rules5:45
3. Big O in Code
4. Space and Time
- Space Complexity10:18
- Timing Real Code11:31
- Big O Quiz12:37
5. Arrays and Lists
- Inside Python Lists14:18
- List Operation Costs15:45
- Two Pointers17:01
6. Array Practice
7. Hash Tables
- Hash Tables21:53
- Collisions23:08
- Dictionaries in Practice24:19
8. Sets and Hashing Practice
- Sets25:19
- Practice: Two Sum26:27
- Practice: First Unique27:29
9. Windows and Prefixes
- Sliding Window28:40
- Practice: Longest Substring29:56
- Prefix Sums31:00
10. Anagrams and Review
- Practice: Valid Anagram32:07
- Practice: Group Anagrams33:12
- Hashing Quiz34:14
11. Stacks and Queues
- Stacks35:59
- Practice: Balanced Brackets37:14
- Queues38:19
12. Linked Lists
- Linked Lists39:30
- Building a Linked List40:43
- Deleting Nodes41:46
13. Linked List Techniques
14. Recursion
- Recursion46:17
- The Call Stack47:27
- Base Cases48:32
15. Recursion Practice
- Recursion Practice49:39
- Memoization50:57
- Practice: Flatten a List52:08
16. Binary Search
- Binary Search53:22
- The bisect Module54:38
- Binary Search on Answers55:41
17. Simple Sorts
- Why Sorting Matters56:56
- Bubble Sort58:12
- Selection Sort59:18
18. Better Sorts
- Insertion Sort1:00:33
- Merge Sort1:01:51
- Why Merge Sort Is Fast1:03:00
19. Quick Sort and Keys
- Quick Sort1:04:23
- Sorting with key1:05:35
- Stable Sorting1:06:39
20. Counting Sort and Practice
- Counting Sort1:07:43
- Practice: Merge Intervals1:08:55
- Sorting Quiz1:10:05
21. Trees
- Trees1:11:44
- Tree Traversals1:13:01
- Level Order1:14:12
22. Measuring and Searching Trees
- Tree Size and Height1:15:18
- Binary Search Trees1:16:30
- Inserting into a BST1:17:42
23. Tree Practice
- Balanced Trees1:18:54
- Practice: Validate a BST1:20:09
- Practice: Lowest Common Ancestor1:21:10
24. Heaps
- Heaps1:22:20
- heapq in Python1:23:30
- Practice: Top K1:24:39
25. Tries and Tree Review
- Tries1:25:55
- Practice: Autocomplete1:27:06
- Trees Quiz1:28:06
26. Graphs
- Graphs1:29:42
- Storing a Graph1:30:59
- Breadth First Search1:32:11
27. Graph Searches
- Depth First Search1:33:30
- Shortest Paths1:34:49
- Practice: Counting Islands1:35:57
28. Weighted Graphs
- Weighted Graphs1:37:07
- Dijkstra's Algorithm1:38:18
- Topological Sort1:39:41
29. Groups and Cycles
- Union Find1:41:09
- Practice: Course Schedule1:42:28
- Graphs Quiz1:43:41
30. Greedy Algorithms
- Greedy Algorithms1:45:17
- Practice: Meeting Rooms1:46:28
- Dynamic Programming1:47:29
31. Dynamic Programming
- Practice: Climbing Stairs1:48:40
- Practice: Coin Change1:49:54
- Longest Common Subsequence1:51:04
32. More Dynamic Programming
- The Knapsack Problem1:52:24
- Practice: House Robber1:53:50
- Practice: Edit Distance1:54:54
33. Backtracking
- Backtracking1:56:07
- Subsets1:57:24
- Practice: Combination Sum1:58:33
34. Puzzles, Bits and Strategy
- Practice: N Queens1:59:48
- Bit Manipulation2:00:55
- Choosing a Technique2:02:00
35. Interview Method
- How to Solve Any Problem2:03:15
- Practice: Most Water2:04:29
- Practice: Three Sum2:05:41
36. Array Interview Problems
- Practice: Maximum Subarray2:06:52
- Practice: Product Except Self2:08:04
- Practice: Trapping Rain Water2:09:05
37. Trees, Lists and Grids
- Practice: Invert a Binary Tree2:10:20
- Practice: Merge Sorted Lists2:11:25
- Practice: Rotting Oranges2:12:29
38. Designing Data Structures
- Practice: LRU Cache2:13:44
- Practice: Min Stack2:15:00
- Practice: Median of a Stream2:16:01
39. Windows, Words and Networks
- Practice: Sliding Window Maximum2:17:10
- Practice: Word Break2:18:21
- Practice: Network Delay2:19:35
40. More Practice: Heaps, Search and DP
41. More Practice: Backtracking and Graphs
- Practice: Generate Parentheses2:24:18
- Practice: Detect a Cycle2:25:27
- Practice: Top K Frequent Words2:26:37
42. More Practice: Sets, Windows and Trees
- Practice: Valid Sudoku2:27:45
- Practice: Minimum Window Substring2:28:50
- Practice: Serialize a Tree2:29:50
43. Interview Questions
- Interview Questions: Part 12:30:55
- Interview Questions: Part 22:32:32
- Big O Cheat Sheet2:34:05
44. Final Quiz and Next Steps
- Final Quiz2:35:11
- Your Practice Plan2:37:03
- Course Complete2:38:14