Programming & Web DevelopmentIntermediate

Data Structures and Algorithms in Python

Arrays to graphs, Big-O and the patterns behind interview questions.

Taught by Anisha Rai · Senior Software Engineer

What you'll learn

  • Analyse the time and space complexity of Python code using Big-O notation
  • Choose between lists, dictionaries, sets, deques and heaps for a given problem
  • Implement linked lists, stacks, queues and binary search trees from scratch
  • Traverse trees and graphs with BFS and DFS, and find weighted shortest paths
  • Apply recursion, sorting and binary search to classic interview problems
  • Solve introductory dynamic programming problems with memoisation and tabulation

About this course

Data structures and algorithms are the foundation of efficient software and the core of most technical interviews. This intermediate course teaches DSA in Python in a practical way. You will learn Big-O time and space complexity, then implement and use arrays, strings, hash maps, linked lists, stacks, queues, trees, heaps and graphs, with recursion, sorting, binary search, BFS, DFS and an introduction to dynamic programming along the way. Every lesson pairs a clear explanation with runnable Python 3 code and exercises that mirror common coding interview questions, so you learn to recognise which structure fits which problem. It suits self-taught developers, computer science students and engineers preparing for interviews. You should already be comfortable with Python basics such as functions, loops, lists and dictionaries. By the end you will be able to analyse your own code and choose efficient solutions with confidence.

Course content

8 lessons
  1. 1Big-O and Thinking About EfficiencyMeasure how code scales with input size using Big-O time and space complexity.Preview
  2. 2Arrays, Strings and Python ListsHow Python lists and strings behave under the hood, plus the two-pointer and prefix-sum patterns.
  3. 3Hash Maps and SetsUse dict, set, Counter and defaultdict to trade memory for constant-time lookups.
  4. 4Linked Lists, Stacks and QueuesBuild a linked list, then use stacks and deques for matching, undo and first-in-first-out problems.
  5. 5Recursion, Sorting and Binary SearchThink recursively, understand merge sort, and binary search sorted data in O(log n).
  6. 6Trees, Binary Search Trees and HeapsTraverse binary trees, build a binary search tree and use heapq for priority queues and top-k problems.
  7. 7Graphs: BFS, DFS and Shortest PathsRepresent graphs with adjacency lists and explore them with BFS, DFS and Dijkstra's algorithm.
  8. 8An Introduction to Dynamic ProgrammingRecognise overlapping subproblems and solve them with memoisation and bottom-up tables.