Course Overview
Master the foundations that power real-world Python.
Write sorting routines and build important data structures from scratch, then discover the Pythonic way to use them in practice. Write unit tests to validate your code. Master Python's special "dunder" methods.
Why this course?
If you’ve already learned the Python language (for example through Tim Buchalka’s Learn Python Programming Masterclass, rated 4.6/5 from over 100,000 reviews and taken by more than 430,000 learners), this new Python Data Structures and Algorithms course is the next logical step. It takes you from I can write Python to I can design efficient Python, using the data structures and algorithms employers expect.
You’ll be learning with Tim Buchalka and JP (Jean-Paul) Roberts, both highly experienced instructors. Tim is a Udemy Instructor Partner with over 1.7 million students and more than 460,000 reviews across his courses. JP brings his industry insight as a co-instructor, ensuring a practical, robust, and engaging learning experience. Their combined expertise means you can feel confident in the quality of this new course, even before reviews come in.
What makes this course different?
Build first, then go Pythonic. Each topic follows a clear pattern: theory, your own code, then Python’s built-in tools like sorted(), heapq, deque, and queue.
Hands-on, job-relevant coverage. Arrays, linked lists, stacks, queues, hash tables, sets, trees, heaps, searching, and sorting are all taught with Big-O analysis and unit tests. You’ll always know your code is correct.
Up-to-date Python. The course covers modern improvements in CPython, including Python 3.11’s Powersort for list.sort(), with comparisons to earlier approaches.
What learners say about Tim and JP’s teaching:
Note: These quotes reflect students’ experiences from the Python Masterclass. As this Python Data Structures and Algorithms course is newly published, reviews for this course will appear soon.
“Not slow, just the right speed if you already know programming… Excellent trainer thus far.” – Linda
“Great, thorough explanations. Very complete. Thank you!” – Anthony
“Exceptionally good… Really well done!!!” – Rakshan
Is this course for you?
Yes: If you already know basic Python and want to think like a software engineer—choose the right structure, reason about performance, and write clean, correct code.
Yes: If you’re preparing for coding interviews or want efficient, practical patterns for real projects.
No: If you’re brand-new to Python. Start with the Masterclass, then return here.
What you’ll learn
Foundations and Big-O: What data structures and algorithms are, time and space complexity, and trade-offs.
Arrays and lists: Memory model, resizing, slicing, iteration, and dunder methods for Pythonic sequences.
Linked lists: Singly/doubly linked lists, insert/delete, reverse, iterate, indexing, and slicing.
Stacks, queues, deques: Manual implementations, plus Python’s deque and queue.
Hash tables and sets: Open addressing, chaining, dict and set, and specialized collections.
Trees: Binary search trees (insert/search/delete), traversal strategies, fully implement a red-black tree.
Heaps and priority queues: Build heaps, Heapsort, and Python’s heapq.
Searching: Linear vs. binary search (iterative and recursive).
Sorting: Bubble, selection, insertion, merge, quick, counting, radix, and Powersort in Python.
Testing and correctness: Write comprehensive unit tests with unittest, inspired by CPython’s testing style.
Abstract Base Classes and Protocols: Use both and understand the differences between them.
Recursion: When to use it and, importantly, when it's not appropriate.
Your learning experience
Code-along videos that take you from fundamentals to advanced structures.
Challenges and solutions so you can cement your understanding.
Production patterns that map directly to Python’s standard library, ready for work environments.
FAQ
Will I both implement algorithms and use Python’s built-ins?
Yes. You’ll start by building your own, then master robust standard-library tools for production.
Does the course cover modern CPython sorting?
Up-to-date Python. The course covers modern improvements in CPython, including Python's assignment expressions (the walrus operator) and Powersort for list.sort(), with comparisons to earlier approaches.
Is there a refund policy?
Yes. Udemy offers a 30-day refund window on eligible courses.
Enroll now
Join the next step in your Python journey and learn the data structures and algorithms that make great Python code possible from first principles to production-grade patterns with Tim Buchalka and JP Roberts guiding your way.
FAQ
FAQ area empty
Course curriculum
Chương 1 Introduction to the course 4 bài · 13 phút
Chương 2 Arrays and Big-O Notation 5 bài · 40 phút
-
Introduction to arrays 0:55
-
Big-O Notation 11:10
- A quick review of arrays in Python Học thử 8:01
- Arrays in memory Học thử 8:21
- Big-O values for array operations Học thử 11:03
Chương 3 Sort Algorithms 47 bài · 6 giờ 7 phút
-
Introduction to sort algorithms 2:42
-
Bubble Sort (theory) 8:11
-
Bubble Sort (implementation) 9:24
-
Unit testing and the Python unittest module 3:15
-
Bubble Sort (testing) 8:09
-
A more comprehensive test suite 13:31
-
A Bubble Sort optimization 4:28
-
Stable vs Unstable sort algorithms 4:19
-
Selection Sort (theory) 6:09
-
Selection Sort (implementation) 6:14
-
Selection Sort (testing) 3:32
-
Insertion Sort (theory) 7:11
-
Insertion Sort (implementation) 9:01
-
Insertion Sort (testing) 1:40
-
Insertion Sort (alternative implementation) 1:54
-
Shell Sort (theory) 11:31
-
Shell Sort (implementation) 15:14
-
Recursion 11:21
-
Recursion walkthrough 11:59
-
Merge Sort (theory - splitting phase) 10:15
-
Merge Sort (theory - merging phase) 12:36
-
Merge Sort (implementation) 9:47
-
Merge Sort (merging) 14:32
-
Merge Sort (completing the merge) 7:31
-
Merge Sort (diagnostic) 1:56
-
Quick Sort (theory) 14:45
-
Quick Sort (implementation) 9:45
-
Quick Sort (testing) 5:41
-
Counting Sort (theory) 9:28
-
Counting Sort (implementation) 9:12
-
Counting Sort (testing) 2:30
-
Stable Counting Sort (theory) 17:04
-
Stable Counting Sort (implementation) 12:12
-
Stable Counting Sort (notes) 7:45
-
Radix Sort (theory) 12:43
-
Radix Sort (implementation) 12:43
-
Radix Sort (negative values) 6:41
-
Sorting using the Python built-in function 16:47
-
Sort Algorithms Challenge #1 2:14
-
Sort Algorithms Solution #1 4:50
-
Sort Algorithms Challenge #2 1:32
-
Sort Algorithms Solution #2 11:36
-
Sort Algorithms Challenge #3 1:52
-
Sort Algorithms Solution #3 6:12
-
Sort Algorithms Challenge #4 1:08
-
Sort Algorithms Solution #4 4:26
-
Summary
Chương 4 Lists 24 bài · 2 giờ 26 phút
-
Introduction to lists 2:35
-
Singly Linked Lists (theory) 9:02
-
Singly Linked Lists (implementation) 8:36
-
Abstract Data Types and Protocols 5:15
-
Abstract Base Class 6:09
-
The Protocol class 3:32
-
Coupling - ABC versus Protocol 5:02
-
Linked List as a Sequence 12:13
-
Doubly Linked Lists (theory) 10:40
-
Doubly Linked Lists (implementation) 9:34
-
Reversed challenge solution 1:57
-
Deleting from a doubly linked list 4:30
-
Deleting from the tail 4:52
-
Deleting from the middle of the list 7:05
-
Inserting at the end of the list 2:47
-
Inserting in the middle of the list 10:38
-
Optimising the getitem method 3:15
-
Lists Challenge #1 2:01
-
Lists Solution #1 6:00
-
Lists Challenge #2 1:04
-
Lists Solution #2 8:19
-
Lists Challenge #3 2:42
-
Lists Solution #3 9:56
-
Summary 8:24
Chương 5 Magic methods 25 bài · 3 giờ 21 phút
-
Introduction to Python's "magic methods" 3:04
-
The __getattribute__ method 4:40
-
Case-insensitive dictionary 9:26
-
__getattribute__ and __getattr__ 8:54
-
Implementing a resizable array 12:31
-
Initialising and extending a sequence 6:32
-
The reverse method 3:59
-
Traversing a doubly linked list 8:39
-
Solution to the count method challenge, plus __contains__ and index 8:50
-
Testing for equality 6:13
-
__setitem__ 4:03
-
Slices and the slice class 12:40
-
Slicing our linked list 8:27
-
Deleting a slice 12:17
-
Finishing the __delitem__ code 11:27
-
Assigning to a slice 9:24
-
Implementing slice in __setitem__ 10:55
-
Finishing __setitem__ 12:16
-
A strange edge case 6:43
-
Operator overloading methods 9:25
-
Reflected operands 5:33
-
__imul__, __add__, and __iadd__ 7:03
-
Strange behaviour and a bug 8:57
-
Python source unit tests 8:39
-
Section summary
Chương 6 Stacks 8 bài · 52 phút
-
Introduction to stacks 2:42
-
Stacks (Theory) 6:54
-
Stack Implementation – list 6:21
-
__slots__ and Linked List Stack Challenge 9:40
-
Linked List Challenge Solution 5:28
-
Basic memory management (the heap and the stack) 12:12
-
Stack Implementation – array 9:07
-
Stacks Summary
Chương 7 Queues and deques 21 bài · 2 giờ 17 phút
-
Introduction to queues 6:23
-
Linked List Queue challenge solution 7:49
-
Self type annotation 8:03
-
Queue implementation – array 9:37
-
Generics in Python 13:17
-
Circular queue theory 4:36
-
Circular queue implementation 9:25
-
Testing the CircularQueue class 6:22
-
Deque theory 8:15
-
Exercise 7.1 Deque array
-
Deque implementation - array 9:53
-
Exercise 7.2 Deque circular array
-
Deque implementation - circular array 8:01
-
Exercise 7.3 Deque linked list
-
Deque implementation - linked list 2:41
-
Testing the deque implementations 7:26
-
Python Queue and Deque classes 10:05
-
Queues and multi-threading 5:38
-
The GUI widgets 12:07
-
Queues in the Python standard library 7:27
-
Summary
Chương 8 Hash Tables 22 bài · 2 giờ 31 phút
-
Hash tables introduction 10:12
-
Hashes, hash functions and hashing 7:48
-
HashTable array implementation 9:17
-
Testing our SimpleHashTable 4:04
-
Open addressing – linear probing 5:49
-
Linear probing implementation 9:54
-
Linear probing – testing 4:04
-
Removing items – theory 3:11
-
Removing items – flag implementation 6:34
-
Testing the pop method 2:34
-
Weak references 10:52
-
Weak reference callback 10:06
-
Chaining 14:27
-
Built-in hash function 8:06
-
Python mappings (a.k.a. hash tables) 11:55
-
Bucket sort (theory) 5:53
-
Bucket sort (implementation) 8:15
-
Exercise 8.1 Insertion sort for a doubly linked list
-
Insertion sort for a doubly linked list 3:56
-
Using Bucket Sort to sort addresses 9:31
-
Secure hashes and the hashlib module 4:08
-
Summary
Chương 9 Search Algorithms 6 bài · 33 phút
-
Introduction 3:06
-
Linear search algorithm 8:56
-
Binary search algorithm (theory) 8:29
-
Iterative Binary search implementation 6:36
-
Recursive Binary Search implementation 6:22
-
Summary
Chương 10 Trees 23 bài · 3 giờ 10 phút
-
Introduction and theory 13:24
-
Binary Search Trees (theory) 14:14
-
Glossary of binary tree terms
-
Binary Search Tree implementation – insertion and traversal 5:48
-
Exercise 10.5 Min and max exercise
-
Min and max exercise solutions 3:05
-
Traversing a binary tree (theory) 7:55
-
Traversing a binary tree 7:44
-
Encapsulating our TreeNode in a BinaryTree class 3:53
-
Iterative insertion and traversal 6:58
-
Creating tree diagrams with Graphviz 9:01
-
Deleting nodes from a binary tree (theory) 8:10
-
Delete node iteratively 7:15
-
Delete node recursively 6:36
-
Recursive delete explained 6:43
-
Searching a binary search tree 9:31
-
Self-balancing trees 14:35
-
Red-black trees 10:58
-
Inserting into a red-black tree – the algorithm 13:25
-
Inserting into a red-black tree – the code 8:29
-
Completing the insert code 18:14
-
Deleting from a red-black tree 14:30
-
Summary
Chương 11 Heaps 11 bài · 1 giờ 28 phút
-
Introduction to heaps 13:27
-
Storing heaps as arrays 9:08
-
Heap push (insert) 10:17
-
Heap pop (delete) theory 8:53
-
Heap pop (delete) implementation 7:59
-
Heap push_pop and replace 7:25
-
Heapify 8:10
-
Heapsort (theory) 6:17
-
Heapsort (implementation) 6:39
-
Heapq in the Python standard library 9:36
-
Summary
Chương 12 Extra Information - Source code, and other stuff 2 bài · 5 phút
-
Source Codes
-
Bonus Lecture and Information 4:48
Requirment
-
Basic knowledge of Python syntax and programming concepts is required.
-
Completion of Learn Python Programming Masterclass (or equivalent experience) recommended.
-
A computer with Python 3 installed and a code editor such as PyCharm, VS Code, or IntelliJ IDEA.
-
No prior experience with data structures or algorithms is required — everything is taught from first principles.
Outcomes
-
Develop problem-solving and debugging skills essential for coding interviews.
-
Apply algorithmic thinking to real-world tasks, writing efficient and readable Python code.
-
Strengthen confidence in data-driven programming and technical interview readiness.
-
Implement core data structures like arrays, stacks, queues, and linked lists from scratch in Python.
-
Understand algorithm efficiency and analyze code performance using Big-O notation.
-
Build and compare sorting and searching algorithms including merge, quick, and binary search.
-
Design and implement trees, heaps, hash tables, and other advanced data structures.
-
Use Python’s built-in tools effectively, such as heapq, deque, and sorted().
0 Student
3 Courses
0 review