IIT Madras Zanzibar · Teaching

← All Courses

Z2005 · BS Reference Archive

Programming and Data Structures

BS curriculum roadmap in Python data structures and algorithms from stacks, linked lists, and queues through sorting, trees, hash tables, heaps, dynamic programming, greedy methods, and graph search. For the active graduate MTech offering (Z5007), see Z5007.

Term Ownership & Parity Archive: In Odd Semester 2026-27, Dr. Nyalala actively teaches Z5007 (MTech Core) and co-teaches Z3003 (BS Core) with Dr. Mahendran V, whereas Z2005 is taught by campus BS faculty. All Python reference modules, runnable Colab notebooks, and LaTeX summaries below link directly to Dr. Nyalala's shared Z5007 parity materials.
Term
Reference Archive · BS Odd Semester Curriculum (Active MTech Parity in Z5007)
Credits
15 (Core)
Instructor
Dr. Innocent Nyalala · Room 105 (F1) · Office Hours: Tuesday, 2:00 PM – 4:00 PM · innocent@iitmz.ac.in
Course Links
Weeks 1–17 Code Explorer · Parity Question Bank · Algorithms Cheat Sheet (PDF) · End-Sem Mock Exam (PDF) · Active MTech Offering (Z5007) · Institute Syllabus PDF · Faculty Course Page ↗

Schedule

SessionFrequencyTime / Room
Lecture4 per weekMonday, Wednesday, Thursday, and Friday (Reference Schedule)
Lab2 per weekReference Lab Parity via Z5007 Notebooks

Materials (Z5007 Parity Reference Archive · Weeks 1–17)

All Weeks 1–17 Python modules, complexity summaries, and runnable Colab notebooks below mirror Dr. Nyalala's shared Z5007 materials; browse code snippets inline in the Weeks 1–17 Code & Complexity Explorer or practice with worked solutions in the Z5007/Z2005 Parity Question Bank.

WeekTopicReference Code, Colab Notebooks & Summaries
1OOP Foundations, Asymptotic Analysis & Big-O
2Arrays, Binary Search & Dynamic Arrays
3Insertion Sort & Stacks (Array vs. Linked)
4Circular Queues, Linked Lists & LRU Cache
5Recursion, Merge Sort, Quicksort & Recurrences
6Binary Trees, Traversals & BST Foundations
7Linear-Time Sorts, BSTs & Self-Balancing AVL Trees
8AVL Trees, Heaps, Priority Queues & Hash Tables
9Graph Representations, BFS, DFS & Topological Sort
10Weighted Shortest Paths: Dijkstra & Bellman-Ford
11Greedy Algorithms & Minimum Spanning Trees (Kruskal & Prim)
12Dynamic Programming: 0/1 Knapsack, LCS & Edit Distance
13Advanced Dynamic Programming (Matrix Chain, LIS, Bitmask TSP)
14String Matching & Prefix Tries (KMP & Rabin-Karp)
15Union-Find & Amortized Potential Analysis
16NP-Completeness, Reductions & 2-Approximation
17Capstone Synthesis, Parallel Scan & Final Exam Prep

Grading

ComponentWeightDetails
In-class assignments10%Seven assignments, done in lab, one every 2 weeks (weeks 2, 4, 6, 8, 10, 12, 14).
Quizzes30%Short in-class quizzes through the semester.
Course project20%Custom ML algorithm from scratch, or a recommendation system.
End semester examination40%Practical and theory, in lab.

Learning Outcomes

  1. Design and implement Python classes using encapsulation, inheritance, and polymorphism, and explain why each data structure in this course is built as a class.
  2. Write, test, and debug Python programs that use functions and recursion.
  3. Implement stacks, queues, linked lists, binary trees, hash tables, and heaps from first principles.
  4. Analyze the running time of an algorithm using big-O notation and justify a structure choice by that analysis.
  5. Implement and compare simple and advanced sorting algorithms.
  6. Apply dynamic programming and greedy strategies to optimization problems.
  7. Represent graphs and apply BFS, DFS, and A* to reachability and shortest-path problems.

Resources

Required Textbook
Data Structures and Algorithms in Python · Robert Lafore, Ami Broder, and Jeremy Canning · Addison Wesley, 2022
Reference Textbook
The Algorithm Design Manual · Steven S. Skiena · Springer, 2008
Materials Repository
All lecture slides, lab sheets, and notebooks for this course are version-controlled and public: github.com/inyalala/iitmz-teaching-site.
Algorithm Visualizers
VisuAlgo: animated visualizations for most structures and algorithms in this course (arrays, trees, heaps, hashing, graphs, sorting).
USFCA Data Structure Visualizations: step-through visualizations, especially strong for trees and hashing.
Python Tutor: visualize your own Python code executing line by line, including recursion and pointers/references.
Video Lectures
Abdul Bari: Algorithms: clear, worked explanations of sorting, DP, and graph algorithms.
MIT 6.006: Introduction to Algorithms (OCW): university-level rigor for the theory behind each topic.
freeCodeCamp: Data Structures and Algorithms in Python: full-course video walkthrough in Python specifically.
Practice Problems
LeetCode · HackerRank: Data Structures · GeeksforGeeks: Data Structures: optional extra practice beyond graded assignments (ungraded).

Policies

Attendance
Attendance is expected at all lectures and labs. Lab work is done during the lab session and submitted before it ends.
Late work
Late work is not accepted. Deadlines are fixed and announced in advance; submit what you have by the deadline. This applies uniformly: there are no extensions or day-based penalty scales.
Academic integrity
Discussing ideas is encouraged; sharing or copying code is not. Every line you submit must be one you can explain.
Use of AI tools
AI coding assistants may be used to explain concepts and read error messages, not to generate solutions you then submit. The examinations assume you can write these structures yourself.