Skip to content

Section 1 · Design and Analysis of Algorithms

Eleven lab sessions on greedy, divide-and-conquer, dynamic programming and graph algorithms, each solved in Python, C and Rust.

Updated View as Markdown

Section 1 of MCS-216 covers the algorithm labs. Every session states the problem exactly as the lab manual does, walks through the logic, then gives a working program in Python, C and Rust.

Sessions

SessionTopic
1Polynomial evaluation, GCD, power, sorting basics
2Fractional knapsack (greedy)
3Task scheduling with and without deadlines (greedy)
4Sorting and selection (divide and conquer)
5Search and merge (divide and conquer)
6Dijkstra’s shortest path
7Minimum spanning tree
8Binomial coefficient (divide and conquer vs dynamic programming)
9Floyd–Warshall all-pairs shortest path
10Matrix chain multiplication
11Optimal binary search tree and Huffman coding

How to use a session

  1. Read the problem statement and solve it on paper first.
  2. Compare your approach with the explanation.
  3. Run the program in the language your lab uses (C is the IGNOU default), then read the other two to see the same idea in a different style.
  4. Copy only what the lab record asks for. Blocks marked for the notebook are the ones examiners expect.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close