Programming and Data Structures
Foundations of programming and classical data structures in Python, covering OOP, stacks, queues, linked lists, sorting, trees, hashing, dynamic programming, greedy methods, and graphs.
Viewing BS Reference Archive (Z2005): Open Active MTech Section (Z5007) ->
Open slide PDFs directly in your browser, read LaTeX lecture notes and worksheets (PDF), preview PowerPoint decks online, or download laboratory notebooks without login walls.
- M1 Week 1 A1 (Week 2): OOP Class Hierarchy
Object-Oriented Programming, then Algorithms
Python classes, encapsulation, inheritance, polymorphism, and asymptotic Big-O complexity.
Readings: Lafore ch. 1; CLRS ch. 3
Archived reference module; see active Z5007 or the teaching repository ↗ - M2 Week 2 A2 (Week 4): Arrays & Amortized Analysis
Arrays and Dynamic Arrays
Contiguous memory layout, searching, rotation, and dynamic resizing strategies.
Readings: Lafore ch. 2; CLRS ch. 17
Archived reference module; see active Z5007 or the teaching repository ↗ - M3 Week 3 A3 (Week 6): MinStack & Queues
Stacks and Queues
Stack ADT, expression parsing, circular buffers, and priority queues.
Readings: Lafore ch. 4
Archived reference module; see active Z5007 or the teaching repository ↗ - M4 Week 4
Linked Lists
Singly and doubly linked lists, pointer updates, insertion, deletion, and locality trade-offs.
Readings: Lafore ch. 5
Archived reference module; see active Z5007 or the teaching repository ↗ - M5 Week 5
Simple Sorting Algorithms
Bubble, selection, and insertion sort with empirical runtime measurement.
Readings: Lafore ch. 3
Archived reference module; see active Z5007 or the teaching repository ↗ - M6 Week 6 A4 (Week 8): MergeSort, HeapSort & BST
Advanced Sorting Algorithms
Merge sort, quicksort partitioning, randomized quicksort, and comparison bounds.
Readings: Lafore ch. 6; CLRS ch. 7-8
Archived reference module; see active Z5007 or the teaching repository ↗ - M7 Week 7
Binary Trees and Balance
Tree traversals (inorder, preorder, postorder), binary search trees, and balanced variants.
Readings: Lafore ch. 8; CLRS ch. 12-13
Archived reference module; see active Z5007 or the teaching repository ↗ - M8 Week 8
Hash Tables and Heaps
Binary min/max heaps, heapify, hash functions, collision handling, and load factor.
Readings: Lafore ch. 9-10; CLRS ch. 11, 19
Archived reference module; see active Z5007 or the teaching repository ↗ - M9 Week 9 A5 (Week 10): DP & Greedy
Dynamic Programming
Overlapping subproblems, memoization, tabulation, 0/1 knapsack, LCS, and edit distance.
Readings: Lafore ch. 11; CLRS ch. 14-15
Archived reference module; see active Z5007 or the teaching repository ↗ - M10 Week 10
Greedy Algorithms
Activity selection, fractional knapsack, Huffman coding, and exchange arguments.
Readings: Lafore ch. 11; CLRS ch. 14-15
Archived reference module; see active Z5007 or the teaching repository ↗ - M11 Week 11
Introduction to Graphs
Adjacency matrices vs. adjacency lists, directed/weighted graphs, and memory constraints.
Readings: Lafore ch. 12; CLRS ch. 20
Archived reference module; see active Z5007 or the teaching repository ↗ - M12 Week 12-13 A6 (Week 12): Shortest Path & MSTs
Graph Algorithms: BFS, DFS, Dijkstra, A*, and MSTs
Graph traversals, topological sort, shortest paths (Dijkstra, Bellman-Ford, A*), and Prim/Kruskal MST.
Readings: Lafore ch. 12; CLRS ch. 21-23
Archived reference module; see active Z5007 or the teaching repository ↗ - M13 Week 14 A7 (Week 14): Comprehensive Design
Parallel and Randomized Algorithms
MapReduce patterns, parallel sorting/search, Monte Carlo methods, and skip lists.
Readings: Lafore ch. 13; CLRS ch. 34
Archived reference module; see active Z5007 or the teaching repository ↗ - M14 Week 15 Final Project Submission
Project Presentations, Rubric, and Exam Review
Course project demonstrations, evaluation rubric, cumulative review, and exam preparation.
Readings: Full semester notes
Archived reference module; see active Z5007 or the teaching repository ↗
Weekly Schedule
| Session | Frequency | Notes |
|---|---|---|
| Lectures | 4 sessions per week | Monday, Wednesday, Thursday, and Friday (2026-27 colleague-taught; active instructor schedule) |
| Laboratory | 2 sessions per week | Hands-on implementation and testing (active instructor schedule) |
| Office Hours | Active instructor schedule | For Z5007/Z3003 inquiries with Dr. Nyalala: Room 105 (F1) Wednesdays 2:00-4:00 PM EAT |
Prerequisites & Stack
Introduction to Programming in Python (functions, loops, conditionals, and debugging basic Python error traces).
Environment: Python 3.11+ · Jupyter / Google Colab · pytest · Git & GitHub Classroom
Learning Outcomes
- 01 Design and implement Python classes using encapsulation, inheritance, and polymorphism.
- 02 Write, test, and debug recursive functions cleanly.
- 03 Build stacks, queues, linked lists, binary trees, hash tables, and heaps from first principles.
- 04 Analyze algorithm runtime using asymptotic Big-O notation.
- 05 Implement and benchmark elementary and O(n log n) sorting algorithms.
- 06 Apply dynamic programming and greedy strategies to optimization problems.
- 07 Represent graphs and solve shortest-path and reachability tasks using BFS, DFS, Dijkstra, and A*.
Assessment & Grading
Seven biweekly lab assignments across Weeks 2 to 14.
Short in-class quizzes through the semester.
Proposal, two milestones, final code, and presentation (from-scratch ML or recommender).
Combined practical and written final examination.
Textbooks & Study Tools
- Data Structures and Algorithms in Python (1st ed.)Required
Robert Lafore, Ami Broder, and Jeremy Canning (Addison Wesley, 2022)
- The Algorithm Design Manual (2nd ed.)Reference
Steven S. Skiena (Springer, 2008)
Interactive animations for arrays, trees, heaps, hash tables, sorting, and graphs.
Step-by-step trace tool suited for binary search trees, balanced trees, and hashing.
Line-by-line visualization of Python call stacks, recursion, and object references.
Theoretical foundations and algorithm analysis lectures.
Optional ungraded coding exercises for extra practice outside lab sessions.
Course Policies & Reuse
Attendance
Attendance is expected at all lectures and labs. Lab exercises are completed and submitted before each session ends.
Late Work
Deadlines are fixed in advance. Late submissions are not accepted unless pre-approved under official institute procedures.
Academic Integrity
Discussing concepts with peers is encouraged; copying or sharing code is prohibited. Every submitted line must be your own work that you can explain.
Use of AI Tools
AI coding assistants may be used to clarify concepts, diagnose error messages, or review code you wrote, not to generate submitted solutions or written proofs.
All lecture notes, slides, and laboratory materials for Z2005 are licensed under CC BY-NC-SA 4.0 . ShareAlike required; commercial use prohibited without permission.