AI Hints
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.

📚 132 lessons▶ 2:38:14+ of video💻 130 code examples🖼 133 screenshots
The complete DSA in Python course, free on YouTubeWatch on YouTube ↗

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.

2. Measuring Speed

  1. Counting Steps3:26
  2. Big O Notation4:33
  3. Big O Rules5:45

4. Space and Time

  1. Space Complexity10:18
  2. Timing Real Code11:31
  3. Big O Quiz12:37

5. Arrays and Lists

  1. Inside Python Lists14:18
  2. List Operation Costs15:45
  3. Two Pointers17:01

8. Sets and Hashing Practice

  1. Sets25:19
  2. Practice: Two Sum26:27
  3. Practice: First Unique27:29

9. Windows and Prefixes

  1. Sliding Window28:40
  2. Practice: Longest Substring29:56
  3. Prefix Sums31:00

11. Stacks and Queues

  1. Stacks35:59
  2. Practice: Balanced Brackets37:14
  3. Queues38:19

14. Recursion

  1. Recursion46:17
  2. The Call Stack47:27
  3. Base Cases48:32

15. Recursion Practice

  1. Recursion Practice49:39
  2. Memoization50:57
  3. Practice: Flatten a List52:08

17. Simple Sorts

  1. Why Sorting Matters56:56
  2. Bubble Sort58:12
  3. Selection Sort59:18

18. Better Sorts

  1. Insertion Sort1:00:33
  2. Merge Sort1:01:51
  3. Why Merge Sort Is Fast1:03:00

19. Quick Sort and Keys

  1. Quick Sort1:04:23
  2. Sorting with key1:05:35
  3. Stable Sorting1:06:39

20. Counting Sort and Practice

  1. Counting Sort1:07:43
  2. Practice: Merge Intervals1:08:55
  3. Sorting Quiz1:10:05

21. Trees

  1. Trees1:11:44
  2. Tree Traversals1:13:01
  3. Level Order1:14:12

22. Measuring and Searching Trees

  1. Tree Size and Height1:15:18
  2. Binary Search Trees1:16:30
  3. Inserting into a BST1:17:42

24. Heaps

  1. Heaps1:22:20
  2. heapq in Python1:23:30
  3. Practice: Top K1:24:39

25. Tries and Tree Review

  1. Tries1:25:55
  2. Practice: Autocomplete1:27:06
  3. Trees Quiz1:28:06

26. Graphs

  1. Graphs1:29:42
  2. Storing a Graph1:30:59
  3. Breadth First Search1:32:11

27. Graph Searches

  1. Depth First Search1:33:30
  2. Shortest Paths1:34:49
  3. Practice: Counting Islands1:35:57

28. Weighted Graphs

  1. Weighted Graphs1:37:07
  2. Dijkstra's Algorithm1:38:18
  3. Topological Sort1:39:41

29. Groups and Cycles

  1. Union Find1:41:09
  2. Practice: Course Schedule1:42:28
  3. Graphs Quiz1:43:41

30. Greedy Algorithms

  1. Greedy Algorithms1:45:17
  2. Practice: Meeting Rooms1:46:28
  3. Dynamic Programming1:47:29

32. More Dynamic Programming

  1. The Knapsack Problem1:52:24
  2. Practice: House Robber1:53:50
  3. Practice: Edit Distance1:54:54

33. Backtracking

  1. Backtracking1:56:07
  2. Subsets1:57:24
  3. Practice: Combination Sum1:58:33

34. Puzzles, Bits and Strategy

  1. Practice: N Queens1:59:48
  2. Bit Manipulation2:00:55
  3. Choosing a Technique2:02:00

38. Designing Data Structures

  1. Practice: LRU Cache2:13:44
  2. Practice: Min Stack2:15:00
  3. Practice: Median of a Stream2:16:01

39. Windows, Words and Networks

  1. Practice: Sliding Window Maximum2:17:10
  2. Practice: Word Break2:18:21
  3. Practice: Network Delay2:19:35

41. More Practice: Backtracking and Graphs

  1. Practice: Generate Parentheses2:24:18
  2. Practice: Detect a Cycle2:25:27
  3. Practice: Top K Frequent Words2:26:37

42. More Practice: Sets, Windows and Trees

  1. Practice: Valid Sudoku2:27:45
  2. Practice: Minimum Window Substring2:28:50
  3. Practice: Serialize a Tree2:29:50

44. Final Quiz and Next Steps

  1. Final Quiz2:35:11
  2. Your Practice Plan2:37:03
  3. Course Complete2:38:14