← Noviq Academy
Programming and data · Beginner · Free
Data Structures and Algorithms with Python
The easy way into DSA: watch each idea work step by step, then code it in Python right in your browser.
Learn how to store data and solve problems efficiently, in simple English. Start with Big-O, then work through lists, strings, hashing, two pointers, sliding windows, binary search, stacks, queues, linked lists, recursion, backtracking, sorting, trees, heaps, graphs, tries, dynamic programming, greedy algorithms and bit tricks. Every lesson has a step-by-step animation, Python you can run, exercises checked instantly and a quiz.
- 40 lessons
- About 850 minutes
- 33 runnable code cells
- 63 auto-checked exercises
- 1 timed practice exams
- 21 flashcards
- 136 quiz questions
No sign-up needed. Your progress is saved on this device.
Course outline
0 of 40 lessons complete
Module 1 · Getting Started
Module 2 · Measuring Speed and Memory
- 3Big-O: how work growsCount steps instead of seconds, and describe how the steps grow as the input gets bigger.20 min
- 4Big-O shortcutsDrop constants, keep the biggest term, add steps in a row, multiply loops inside loops, and spot log n.20 min
- 5Space complexity: how much memory?Measure the extra memory an algorithm needs, including the hidden memory used by recursive calls.15 min
Module 3 · Arrays, Strings and Hashing
- 6Arrays and Python listsBoxes in a row: fast to read by index, slow to insert at the front. Plus 2D lists for grids.20 min
- 7StringsText as a row of characters: indexing, slicing, why strings can't change, and building them the fast way.18 min
- 8Hashing: finding things instantlyHow a hash function turns a key into a bucket number, what collisions are, and why lookups are O(1) on average.18 min
- 9Solving problems with dicts and setsUse sets for 'have I seen this?' and dicts for counting and remembering, turning O(n²) ideas into O(n).22 min
Module 4 · Smart Patterns for Lists
- 10Two pointersWalk two positions through a list at once, from both ends or at two speeds, to turn O(n²) into O(n).22 min
- 11Sliding windowKeep a 'window' over part of a list and slide it, updating the answer instead of starting over.22 min
- 12Prefix sums and the best subarrayPrecompute running totals to answer range sums instantly, and use Kadane's idea to find the biggest subarray sum.20 min
- 13Binary searchFind a value in a sorted list by halving the search area each step: O(log n).22 min
Module 5 · Stacks, Queues and Linked Lists
- 14Stacks: last in, first outA pile where you add and remove only at the top. Used for undo, brackets and the function call stack.20 min
- 15Monotonic stack: the next greater numberKeep a stack in order to answer 'what is the next bigger value?' for every item in one pass.18 min
- 16Queues and deques: first in, first outA line where you join at the back and leave from the front. Use collections.deque in Python.18 min
- 17Linked listsA chain of nodes, each pointing to the next. Cheap to insert at the front, slow to reach the middle.24 min
- 18Linked list tricksDelete a node, reverse a list, find the middle and catch a cycle with slow and fast pointers. Plus doubly and circular lists.24 min
Module 6 · Recursion, Backtracking and Divide and Conquer
- 19Recursion: a function that calls itselfSolve a big problem by solving a smaller copy of it, with a base case that stops the calls.22 min
- 20Recursion on lists and stringsPractise the shrink-and-combine habit on lists and words, and compare recursion with loops.20 min
- 21Backtracking: try, then undoExplore every choice like paths in a maze: choose, explore, undo. Build subsets, permutations and combinations.25 min
- 22Divide and conquerSplit a problem into halves, solve each half, and combine the answers. The idea behind merge sort and quick sort.20 min
Module 7 · Sorting
- 23Simple sorts: bubble, selection and insertionThree easy-to-understand sorting methods, how they work step by step, and why they are O(n²).25 min
- 24Fast sorts: merge, quick, heap and countingThe O(n log n) sorts and when each is used, a sort that doesn't compare at all, and Python's own sorted().22 min
Module 8 · Trees and Heaps
- 25Trees: data with branchesRoots, children, leaves and height. Binary trees and the kinds you'll meet: full, complete, perfect, balanced and skewed.20 min
- 26Visiting every node: DFS and BFSPreorder, inorder and postorder (depth-first), and level order (breadth-first) with a queue.22 min
- 27Binary search treesA tree where smaller values go left and bigger go right, so search, insert and delete follow one path.22 min
- 28Heaps and priority queuesAlways get the smallest (or biggest) item fast. Python's heapq, and the Top-K pattern.22 min
Module 9 · Graphs and Tries
- 29Graphs: things and connectionsVertices and edges, directed and weighted graphs, and how to store a graph with an adjacency list.20 min
- 30Exploring a graph: BFS and DFSVisit every reachable vertex with a queue (BFS) or a stack/recursion (DFS), and never visit one twice.24 min
- 31Shortest paths with weights: DijkstraFind the cheapest route when edges have different costs, with a heap. Plus when to use Bellman-Ford and Floyd-Warshall.24 min
- 32Task order, groups and cheap networksTopological sort for dependencies, union-find for grouping, and minimum spanning trees with Kruskal and Prim.25 min
- 33Tries: trees of lettersStore words letter by letter so words with the same start share a path. Great for autocomplete.20 min
Module 10 · Dynamic Programming and Greedy
- 34Dynamic programming: remember, don't repeatWhen a recursion solves the same small problems again and again, save each answer once. Memoization and tabulation.24 min
- 35DP patterns: take or skip, grids, knapsack, sequencesThe common shapes of DP problems: House Robber, grid paths, 0/1 knapsack, coin change and longest common subsequence.28 min
- 36Greedy algorithms: the best choice right nowMake the choice that looks best at each step and never look back. When it works, and when it fails.24 min
Module 11 · Bits, Range Tools and Final Review
- 37Bit manipulationNumbers as 0s and 1s, the operators & | ^ ~ << >>, and neat tricks like checking powers of two and the XOR single-number puzzle.22 min
- 38Range tools: segment trees and Fenwick treesWhen numbers keep changing and you keep asking for range sums, prefix sums are too slow. Meet two O(log n) helpers.18 min
- 39The pattern map: which tool when?Turn problem wording into the right data structure or pattern. A cheat sheet, a matching drill and flashcards.20 min
- 40Final exam and next stepsA timed exam across the whole course, a reflection, and where to go next.30 min