Free Course Image Python Data Structures and Algorithms: Learn Efficient Programming

Free online coursePython Data Structures and Algorithms: Learn Efficient Programming

Duration of the online course: 27 hours and 59 minutes

New

Free IIT Madras course on Python data structures, algorithms, complexity, sorting, graphs, greedy, DP, and string matching for efficient coding.

In this free course, learn about

  • Getting Started with Python and Writing Efficient Code
  • Algorithm Analysis, Searching, and Sorting Fundamentals
  • Advanced Sorting and Core Python Data Structures
  • Graph Algorithms: Traversal, DAGs, and Topological Order
  • Weighted Graphs: Shortest Paths and Minimum Spanning Trees
  • Data Structures for Efficient Algorithms: Union-Find, Heaps, and Search Trees
  • Greedy and Divide-and-Conquer Design Techniques
  • Dynamic Programming Foundations and Classic Problems
  • Optimization, Network Flows, and Computational Intractability
  • String Matching Algorithms and Text Indexing
  • Course Recap and Review

Course Description

Python Data Structures and Algorithms: Learn Efficient Programming is a free online course from IIT Madras designed for learners who want to write cleaner, faster, and more scalable Python code. It builds a strong foundation in programming fundamentals while steadily shifting focus toward algorithmic thinking and performance-aware problem solving.

You will move from practical Python setup and coding workflows into core language concepts such as exceptions and classes, then learn how to measure runtime and understand why efficiency matters in real programs. From there, the course develops a rigorous approach to algorithm analysis, helping you compare growth rates, calculate complexity, and reason about tradeoffs when choosing solutions.

The curriculum explores classic searching and sorting techniques, including merge sort and quicksort, along with the reasoning used to analyze them. You will also study how common data structures are built and used in Python, including list-like structures and dictionaries, so you can select the right tool and understand what happens under the hood.

Graph fundamentals form a major component, covering representations, BFS and DFS, directed acyclic graphs, topological sorting, and paths in DAGs. You then progress to weighted graph problems such as shortest paths with Dijkstra and Bellman-Ford, all-pairs shortest paths with Floyd-Warshall, and spanning tree strategies with Prim and Kruskal.

To deepen your toolkit, the course includes union-find, priority queues, heaps, and search trees, followed by balanced trees and greedy methods for scheduling, lateness minimization, and Huffman coding. You will also work with divide-and-conquer ideas, quickselect, dynamic programming concepts such as memoization, grid paths, and classic string problems including edit distance.

Advanced topics introduce linear programming, network flows, reductions, and the fundamentals of intractability, along with comprehensive week summaries to consolidate learning. By the end, you will be better prepared to design efficient solutions and approach coding interviews, coursework, and real-world engineering tasks with stronger algorithmic confidence.

Course content

  • Video class: W1_L1: Introduction to jupyter notebooks 15m
  • Exercise: Which feature of Jupyter notebooks most directly supports collaboration and sharing results?
  • Video class: W1_L2: Implementation of python codes | part 1 08m
  • Video class: W1_L3: Python recap - I 09m
  • Exercise: Why does the loop use range(1, min(m,n) + 1) when checking for common factors?
  • Video class: W1_L4: Python recap - II 19m
  • Video class: W1_L6: Exception handling 13m
  • Exercise: In Euclid’s algorithm for computing gcd(m, n), what replaces the repeated subtraction (m − n) approach to reduce the problem size?
  • Video class: W1_L5: Python recap - III 16m
  • Video class: W1_L7: Classes 18m
  • Exercise: What key idea defines an abstract data type (ADT) such as a stack?
  • Video class: W1_L8: Implementation of python codes | part 2 07m
  • Video class: W1_L9: Timing our code 05m
  • Exercise: In Python, what is the main purpose of calling a performance counter (e.g., perf_counter) twice and taking the difference?
  • Video class: W1_L10: Implementation of python codes | part 3 06m
  • Video class: W1_L11: Why efficiency matters? 20m
  • Exercise: Why does keeping the Aadhaar database sorted make validating SIM–Aadhaar links much faster?
  • Video class: W1_L12: Implementation of python codes | part 4 05m
  • Video class: W2_L1: Analysis of algorithms 35m
  • Exercise: When comparing algorithm running times for large inputs, what is typically ignored to focus on asymptotic growth?
  • Video class: W2_L2: Comparing orders of magnitude 24m
  • Video class: W2_L3: Calculating complexity 18m
  • Exercise: What is the worst-case time complexity (Big-O) of checking whether a list contains any duplicate elements by comparing each element with all elements to its right using two nested loops?
  • Video class: W2_L4: Searching in a list 11m
  • Video class: W2_L5: Selection sort 15m
  • Exercise: In selection sort (in-place version), what loop invariant is maintained at the start of each outer-loop iteration with index i?
  • Video class: W2_L6: Inserting sort 15m
  • Video class: W2_L7: Merge sort 12m
  • Exercise: In merge sort, what is the key operation used to combine the results of sorting two halves?
  • Video class: W2_L8: Analysis of merge sort 09m
  • Video class: W2_L9: Implementation of searching 10m
  • Exercise: In a timed worst-case experiment on a list of size 10^5, which search method is expected to be much faster and why?
  • Video class: W3_L1: Quicksort 17m
  • Video class: W3_L2: Analysis of quicksort 10m
  • Exercise: In quicksort, what pivot-choice situation leads to the worst-case time complexity of O(n^2)?
  • Video class: W3_L3: Implementation of quicksort algorithm 03m
  • Video class: W3_L4: Concluding remarks on sorting algorithms 06m
  • Exercise: What does it mean for a sorting algorithm to be stable when sorting records by a key (e.g., sorting students by name after they were sorted by roll number)?
  • Video class: W3_L5: Difference between lists 17m
  • Video class: W3_L6: Designing a flexible list 19m
  • Exercise: In a node-based flexible list (linked list), which convention is used to represent an empty list?
  • Video class: W3_L7: Implementation of lists in python 18m
  • Video class: W3_L8: Implementation of dictionaries in python 15m
  • Exercise: Why must dictionary keys in Python be immutable?
  • Video class: W3_L9: Difference between lists 14m
  • Video class: W4_L1: Introduction to graphs 24m
  • Exercise: In graph theory, what is the key difference between a path and a walk?
  • Video class: W4_L2: Representing graphs 18m
  • Video class: W4_L3: Breadth first search (BFS) 33m
  • Exercise: In Breadth First Search (BFS), which data structure is typically used to ensure vertices are explored level by level in the order they were discovered?
  • Video class: W4_L4: Depth first search (DFS) 17m
  • Video class: W4_L5: Applications of BFS 31m
  • Exercise: In a directed graph explored using DFS, which type of non-tree edge indicates the presence of a directed cycle?
  • Video class: W4_L6: Introduction to directed acyclic graph (DAG) 08m
  • Video class: W4_L7: Topological sorting 20m
  • Exercise: Why can every directed acyclic graph (DAG) be topologically sorted?
  • Video class: W4_L8: Longest path in DAGs 10m
  • Video class: W5_L1: Shortest paths in weighted graphs 09m
  • Exercise: Why can’t BFS be used to find shortest paths in a weighted graph in general?
  • Video class: W5_L2: Single source shortest paths | dijkstra's algorithm) 24m
  • Video class: W5_L3: Single source shortest paths with negative weights | bellman-ford algorithm) 18m
  • Exercise: Why can Dijkstra’s algorithm fail on graphs with negative edge weights?
  • Video class: W5_L4: All pairs shortest paths | floyd-warshall algorithm 24m
  • Video class: W5_L5: Minimum cost spanning trees 08m
  • Exercise: In a weighted graph, what is the weight (total cost) of a spanning tree?
  • Video class: W5_L6: Minimum cost spanning trees (prim's algorithm) 23m
  • Video class: W5_L7: Minimum cost spanning trees (kruskal's algorithm) 23m
  • Exercise: In Kruskal’s algorithm for building a minimum spanning tree, when is an edge skipped?
  • Video class: W6_L1: Union-find data structure 29m
  • Video class: W6_L2: Priority queues 18m
  • Exercise: Which pair of core operations defines a (max) priority queue in this context?
  • Video class: W6L3_Heaps 39m
  • Video class: W6_L4: Using heaps in algorithms 28m
  • Exercise: In a heap-based implementation of Dijkstra’s algorithm, what extra information is typically maintained to efficiently decrease a vertex’s distance key in the heap?
  • Video class: W6L5_Search Trees 37m
  • Video class: W6_L5: Search trees 45m
  • Exercise: In an AVL (height-balanced) binary search tree, what condition must hold at every node to be considered balanced?
  • Video class: W7_L1: Balanced search tree 35m
  • Video class: W7_L2: Greedy algorithms-interval scheduling 29m
  • Exercise: Which greedy strategy guarantees an optimal schedule for minimizing the maximum lateness in single-machine scheduling with processing times Ti and deadlines Di?
  • Video class: W7_L3: Greedy algorithms-minimizing lateness 42m
  • Video class: W7_L4: Greedy algorithms-huffman coding 25m
  • Exercise: In a divide-and-conquer algorithm for counting inversions, how are the inversions that cross the midpoint (left part vs right part) counted efficiently?
  • Video class: W8_L1: Divide 29m
  • Video class: W8_L2: Divide 28m
  • Exercise: In Karatsuba’s integer multiplication, what key change reduces the number of recursive multiplications when multiplying two n-bit numbers?
  • Video class: W8_L3: Divide 19m
  • Video class: W8_L4: Divide 27m
  • Exercise: In the selection algorithm that partitions around a pivot (quick select), what should be done when the lower partition has length m and k > m + 1?
  • Video class: W8_L5: Divide 08m
  • Video class: W8_L6: Implementation of quick select 19m
  • Video class: W9_L1: Dynamic programming 21m
  • Video class: W9_L2: Memorization 25m
  • Exercise: In the grid-paths DP recurrence (moves only Right or Up), how is the number of paths to cell (i, j) computed when (i, j) is not blocked?
  • Video class: W9_L3: Grid paths 27m
  • Video class: W9_L4: Common subwords 26m
  • Video class: W9_L5: Edit distance 29m
  • Exercise: In the dynamic programming solution for matrix chain multiplication, why is the DP cost table filled diagonal-by-diagonal (in increasing j−i)?
  • Video class: W11_L7: Intractability-p 11m
  • Video class: W11L1_Linear Programming 27m
  • Exercise: In a linear programming problem, where does an optimal solution occur (when it exists and is bounded)?
  • Video class: W11_L1: Linear programming 19m
  • Video class: W11_L2: Linear programming-production planning 11m
  • Exercise: Why does modeling bandwidth allocation by creating one linear-programming variable per possible route/path fail to scale well?
  • Video class: W11_L3: Linear programming-bandwidth allocation 24m
  • Video class: W11_L4: Network flows 14m
  • Exercise: How can a bipartite matching problem (e.g., assigning teachers to subjects) be solved using network flow?
  • Video class: W11_L5: Reductions 27m
  • Video class: W11_L6: Intractability-checking algorithms 17m
  • Exercise: Which statement best captures why the class NP is defined the way it is?
  • Video class: W12_L1: String matching 15m
  • Exercise: In the Boyer–Moore string matching heuristic described, what preprocessing data structure is built to decide how far to shift after a mismatch?
  • Video class: W12_L2: String matching-boyer-moore algorithm 16m
  • Video class: W12_L3: String matching-rabin-karp algorithm 17m
  • Exercise: What is the key idea of the automaton-based string matching approach described, compared to brute force or Boyer–Moore?
  • Video class: W12_L4: String matching using automata 18m
  • Video class: W12_L5: String matching-knuth-morris-pratt algorithm 34m
  • Video class: W12_L6: String matching-tries 27m
  • Video class: Summary of Weeks 1 to 3 15m
  • Video class: Summary of weeks 4 to 6 19m
  • Exercise: Which graph traversal explores nodes level by level and is commonly used to find shortest paths in an unweighted graph?
  • Video class: Summary of Weeks 7 to 9 23m
  • Video class: Summary of Weeks 10 to 11 20m
  • Exercise: In string matching, what does a finite automaton-based approach primarily do while scanning the text?

This free course includes:

27 hours and 59 minutes of online video course

Digital certificate of course completion (Free)

Exercises to train your knowledge

100% free, from content to certificate

Ready to get started?Download the app and get started today.

Install the app now

to access the course
Icon representing technology and business courses

Over 5,000 free courses

Programming, English, Digital Marketing and much more! Learn whatever you want, for free.

Calendar icon with target representing study planning

Study plan with AI

Our app's Artificial Intelligence can create a study schedule for the course you choose.

Professional icon representing career and business

From zero to professional success

Improve your resume with our free Certificate and then use our Artificial Intelligence to find your dream job.

You can also use the QR Code or the links below.

QR Code - Download Cursa - Online Courses

More free courses at Programming Fundamentals

Free Ebook + Audiobooks! Learn by listening or reading!

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate