IIT Madras Zanzibar · Teaching

← All Courses

Z5007 · MTech Core · Odd Semester 2026-27

Programming and Data Structures

Graduate core course in Python data structures and algorithms pairing implementation from first principles with asymptotic and amortized analysis, formal proofs, balanced trees, hashing, heaps, dynamic programming, greedy algorithms, and graph search. For the BS section (Z2005), see the BS archive.

Term
Odd Semester, Oct 5, 2026 – Jan 28, 2027 (Exams Feb 1–5, 2027)
Credits & Prerequisite
15 Credits (MTech Core) · Intro to Programming in Python & Discrete Maths
Instructor & Office Hours
Dr. Innocent Nyalala · Room 105 (F1) · Office Hours: Tuesday, 2:00 PM – 4:00 PM · innocent@iitmz.ac.in
Course Links
Question Bank · Weeks 1–17 Code Explorer · Master Cheat Sheet (PDF) · Midterm Review Solutions (PDF) · End-Sem Mock Exam & Solutions (PDF) · Project Starter (.ipynb) · Self-Test Suite (.py) · Institute Syllabus PDF · Quiz 1 Practice (40 Qs) · Faculty Course Page ↗

Weekly Schedule & Prerequisites

SessionScheduleRoom / Notes
Lectures (4 weekly)Monday, Wednesday, Thursday, and FridayMon 9:00–9:50 AM · Wed 11:00–11:50 AM · Thu 10:00–10:50 AM · Fri 11:00–11:50 AM
Laboratory (1 weekly)Thursday, 2:00 PM – 4:40 PM2 hr 40 min hands-on coding & benchmarks (ICAs run 2:00–2:45 PM)
Office HoursTuesday, 2:00 PM – 4:00 PMRoom 105 (F1) (Bweleo Campus) or email with Z5007 subject

Formal Prerequisites: Prior proficiency in foundational Python (functions, recursion basics, loops, OOP classes, and reading Python tracebacks) and introductory discrete mathematics. Google Classroom course materials are mirrored here permanently across academic terms.

Course Materials (Weeks 1–17 Complete Roadmap, Code, Notebooks & Summaries)

Every published module pairs original Slide PDFs, LaTeX Summary Notes (PDF), tested Python Reference Modules (.py), and runnable Jupyter Notebooks (.ipynb + Google Colab), all browsable with Big-O complexity summaries in the Weeks 1–17 Code & Complexity Explorer.

WeekModule & DatesLecture Slides, LaTeX Notes, Code & Labs
Week 1 Orientation, Asymptotic Analysis & Big-O
Oct 5–9 · Canning, Broder & Lafore Ch. 1–2
Week 2 Arrays, Binary Search, Dynamic Arrays & Simple Sorts
Oct 12–16 · Canning, Broder & Lafore Ch. 2–3
Week 3 Insertion Sort & Stacks (Arrays vs. Linked Nodes)
Oct 19–22 · Canning, Broder & Lafore Ch. 3–4
Week 4 Circular Queues, Linked Lists, Sentinels & LRU Cache
Oct 28–30 · Canning, Broder & Lafore Ch. 4–5
Week 5 Recursion, Merge Sort, Quicksort & Master Theorem
Nov 2–6 · Canning, Broder & Lafore Ch. 6–7
Week 6 Quiz 1 Review, Binary Trees & BST Foundations
Nov 12–14 · Written Closed-Book Assessment + Trees Prep
Week 7 Linear-Time Sorts, Binary Trees, BSTs & AVL Prep
Nov 16–20 · Canning, Broder & Lafore Ch. 8
Week 8 AVL Trees, Heaps, Priority Queues & Hash Tables
Nov 23–27 · Canning, Broder & Lafore Ch. 8, 10, 11, 13
Week 9 Graph Representations, BFS, DFS & Topological Sort
Nov 30–Dec 4 · Ch. 14 · ICA 3 on Thu Dec 3
Week 10 Weighted Shortest Paths: Dijkstra & Bellman-Ford
Dec 7–11 · Ch. 14–15 · Zanzibar Routing Case Study
Week 11 Greedy Algorithms & Minimum Spanning Trees (Kruskal & Prim)
Dec 14–18 · Skiena; Ch. 14–15 · Union-Find & Cut Property
Week 12 Dynamic Programming: Memoization, 0/1 Knapsack, LCS & Edit Distance
Dec 21–24 · Quiz 2 Dec 22–24 · Sequence Alignment
Week 13 Advanced Dynamic Programming: Matrix Chain, O(n log n) LIS & Bitmask TSP
Dec 28–Jan 1 · Interval & State-Compression DP
Week 14 String Matching & Prefix Tries (KMP & Rabin-Karp)
Jan 4–8 · Autocomplete, Failure Functions & Rolling Hashes
Week 15 Union-Find & Amortized Potential Analysis Review
Jan 11–15 · ICA 4 on Thu Jan 14 · Path Compression & Aggregate Bounds
Week 16 NP-Completeness, Polynomial Reductions & 2-Approximation
Jan 18–22 · 3-SAT, Independent Set, Vertex Cover
Week 17 Capstone Synthesis, Randomized & Parallel Algorithms; Practical & Theory Exams
Jan 25–Feb 5 · Ch. 12, 16 · Practical Exam Thu Jan 28 · Theory Exams Feb 1–5

Assessment & Grading (Official Z5007 Breakdown)

ComponentWeightSchedule & Coverage
Quiz 110%Nov 12–14 (institute window) · Written closed book covering Weeks 1–5 (Ch. 1–7).
Quiz 210%Dec 22–24 (institute window) · Written closed book covering Weeks 7–11 (Trees, Hashing, Heaps, DP, Greedy).
In-Class Assignments (4 ICAs)12%Thu labs 2:00–2:45 PM (Oct 22, Nov 5, Dec 3, Jan 14) · Offline auto-tested coding on the completed block.
Weekly Labs8%Every Thursday 2:00–4:40 PM · Best 9 of 11 graded weekly laboratory notebooks.
Course Project (Pairs)20%Nov 6 to Jan 28 · Pair engineering project with proposal, checkpoint, report, and viva.
End-Semester Practical20%Thu Jan 28 in lab (2 hr 40 min) · Offline implementation across the full course.
End-Semester Theory20%Feb 1–5 institute exam window · Comprehensive written closed-book examination.

Course Learning Outcomes (CLO1–CLO6)

  1. CLO1: Analyze the time and memory cost of algorithms using Big-O notation, recurrences, and amortized analysis.
  2. CLO2: Implement arrays, stacks, queues, linked lists, trees, hash tables, heaps, and graphs from first principles in Python.
  3. CLO3: Prove algorithm correctness using loop invariants and exchange arguments, and reason about lower bounds such as sorting's $\Omega(n \log n)$ bound.
  4. CLO4: Design efficient solutions using sorting, recursion, dynamic programming, greedy algorithms, and graph search.
  5. CLO5: Evaluate empirical performance by profiling, benchmarking, and choosing data structures backed by experimental evidence.
  6. CLO6: Apply data structures and parallel or randomized methods to large real datasets, including Zanzibar routing and agricultural pricing workloads.

Textbooks & Resources

Required Spine
Data Structures & Algorithms in Python · John Canning, Alan Broder, and Robert Lafore · Addison-Wesley, 2022 (Ch. 1–16).
Reference Text
The Algorithm Design Manual (3rd ed.) · Steven S. Skiena · Springer, 2020 (dynamic programming, greedy, A*, randomized methods).
Optional Rigor
Introduction to Algorithms (4th ed.) · Cormen, Leiserson, Rivest, and Stein · MIT Press, 2022.
Source Archive
Permanent files mirrored from Google Classroom (q3qmenl2): github.com/inyalala/iitmz-teaching-site/courses/z5007 ↗.

Course Policies

Attendance
Attendance is expected at all four weekly lectures and Thursday labs. Bring a charged laptop to class and complete weekly labs before the session ends.
Late Work
Late submissions lose 10% per day and are not accepted after 3 days. For documented emergencies, contact Dr. Nyalala before the deadline.
Academic Integrity
Discussing ideas with classmates is encouraged; sharing or copying code is prohibited. Every submitted line must be code you can trace and explain orally.
Use of AI Tools
AI coding assistants may be used to clarify concepts and inspect error messages, not to generate submitted lab solutions, ICA code, or written proofs.