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

Write faster Python with data structures, Big-O and classic algorithms in a free online course—practice with exercises and level up for interviews.

In this free course, learn about

  • Use Jupyter notebooks for runnable, shareable analysis (cells, outputs, collaboration)
  • Python programming recap: loops, functions, exceptions, classes, ADTs and implementations
  • Empirically time code (perf_counter deltas) and relate experiments to efficiency concerns
  • Algorithm analysis: asymptotic growth, Big-O, orders of magnitude, worst-case reasoning
  • Searching & sorting: linear/binary search; selection, insertion, merge, quicksort; stability
  • Core data structures: linked lists, dictionaries (hashing/immutability), heaps, priority queues
  • Graph basics & representations; traversals BFS/DFS; paths vs walks; cycle detection via edges
  • DAG algorithms: topological sort and longest-path DP over topological order
  • Shortest paths: Dijkstra, Bellman-Ford, Floyd-Warshall; why BFS fails on weighted graphs
  • Minimum spanning trees: Prim, Kruskal; union-find; when edges are skipped to avoid cycles
  • Balanced search trees (AVL): height-balance invariants and efficient search/update
  • Design paradigms: greedy, divide-and-conquer, dynamic programming with key recurrences
  • Optimization & complexity: linear programming, network flows, reductions, NP viewpoint
  • String matching: Boyer–Moore, Rabin–Karp, KMP, automata scanning, and tries

Course Description

Efficient programming is more than making code work; it is about making it scale. This free online course helps you build the problem-solving mindset behind high‑performance Python by combining solid programming fundamentals with the most important data structures and algorithms used in real systems and technical interviews.

You will start in a practical environment using Jupyter notebooks, then strengthen core Python skills such as clean implementations, exception handling, and classes. From there, the course guides you to measure and reason about performance, so you can move beyond guesswork and confidently choose approaches that reduce runtime and improve responsiveness.

As you progress, you will learn to analyze algorithms using asymptotic thinking and apply that analysis to everyday tasks like searching and sorting. You will connect theory to code by implementing well-known techniques and understanding when trade-offs matter, including stability, worst-case behavior, and how input characteristics influence results.

The course then expands your toolkit with foundational structures such as flexible lists, dictionaries, heaps, priority queues, union-find, and balanced search trees. With these building blocks, you will tackle core graph ideas and methods used across routing, dependency resolution, and network design, including BFS, DFS, topological sorting, shortest paths, and spanning trees.

To round out your algorithmic thinking, you will explore key paradigms such as divide and conquer, greedy strategies, and dynamic programming, learning how to recognize patterns like optimal substructure and how to turn them into efficient solutions. Later sections introduce practical concepts from optimization and complexity, including linear programming, flows, reductions, and intractability, helping you understand what can be solved efficiently and what likely cannot.

By the end, you will be able to read algorithmic problems with more confidence, write clearer Python implementations, and justify your design choices with complexity arguments—skills that translate directly into stronger project code, better debugging, and improved interview performance.

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