Sahayak Academic Repository

Design and Analysis of Algorithms

CSESemester 3Course Code: CACSC303

Difficulty

moderate

Time Investment

moderate

Scoring Potential

moderate

Primary Type

numerical

General Overview

A common misconception about this subject is that you need prior knowledge of DSA to be good at it. That's not true. LeetCode/Codeforces won't help you much here, as college papers expect very different answers.
Course Curriculum
01

Analysis of Algorithm

easyhigh Scoring
  • Overview: A very easy unit comprising basic theory. You just have to understand different asymptotic notations and common DSA paradigms (memorize examples for them).

  • RAM Model: Theory-based. Just study it from ChatGPT (its significance and whether it is practically implementable).

  • Asymptotic Notation: Definition and questions like finding time complexity for given functions. Recurrence relations are very important. Refer to 5 Minutes Engineering or Gate Smashers.

  • Algorithmic Paradigms: Basic definitions along with a loop/code example.

  • End Advice: This is a very easy and high-scoring unit. Just make sure you can find time complexity and practice questions on the Master's Method.

02

Searching and Sorting

hardmoderate Scoring
  • Overview: This is the unit that will make you work a lot. It's packed, and almost every word in the syllabus can be turned into a question.

  • Trees: AVL trees can be asked to be drawn, so practice them beforehand. Same for Red-Black Trees (Gate Smashers). BST—just understand the concept; it's not asked much.

  • Sorting: You should be able to write algorithms for all sorting techniques. They may ask intermediate steps by giving a series of numbers. Heap Sort, Counting Sort, and Quick Sort are the most important. This section has a lot of questions.

  • Searching: A weird section with very few resources for Boyer-Moore (refer to Er. Sahil). For KMP, refer to Abdul Bari. It's a bit tricky to understand but will surely be asked in the paper. They will also ask you to make intermediate arrays, so don't skip that.

  • End Advice: Though tricky, this unit sets the tone for DAA. You need to invest time here. Practice Heap Sort, Red-Black Trees, AVL Trees, and Quick Sort.

03

Graph Traversal

easyhigh Scoring
  • Overview: Don't get afraid seeing graphs. This is a very easy and scoring unit—just follow tutorials without fear.

  • Basic Traversal: Must understand Linked List and Adjacency Matrix traversal. BFS and DFS are important (Gate Smashers).

  • Topological Sorting: Most important; almost certain to be asked. They expect Kahn's Method, so learn that properly.

  • Single Source Shortest Path: Dijkstra is most important. Be aware of others like Bellman-Ford and Floyd-Warshall. Though not in the syllabus (they still gave a question), you should know how Bellman-Ford and Floyd-Warshall work. Confirm with your teacher regarding Floyd-Warshall— in my year they asked it but later gave bonus marks.

  • End Advice: This is an easy unit. Just confirm topics with your subject teacher, as some topics are tricky. Avoid solving Floyd-Warshall in the paper as its solution is lengthy. Be sure to practice Dijkstra and Topological Sort.

04

Greedy / Dynamic Programming

hardmoderate Scoring
  • Overview: This is a pretty hectic unit. One important note: do not leave any topic thinking only three questions are asked and you'll study only the most probable ones. No. Because Unit 5 is weird, sometimes they pick questions from this unit and place them in Section 5 of the end-sem exam. So cover every topic.

  • MST: Must know what an MST is and be capable of solving using both Prim's and Kruskal's algorithms.

  • Greedy: Huffman Coding is important (5 Minutes Engineering). Fractional Knapsack is not asked much since they prefer the trickier 0/1 Knapsack.

  • DP:

    • Binomial Coefficient is rarely asked; do it from any channel.
    • MCM (Matrix Chain Multiplication) is tough and lengthy; skip if low on time.
    • LCS (Longest Common Subsequence) is important—make sure to do it properly. Note: They ask you to draw the DP table for all of these. Abdul Bari is best for this section.
  • End Advice: Though hectic, this unit can appear in two sections in the end-sem, so it's unskippable. Make sure to practice especially table making.

05

NP Completeness

hardmoderate Scoring
  • Overview: Honestly, this unit is confusing. My teacher didn't teach it, and no question came from it. I studied it from ChatGPT the night before, and it looked weird.

  • NP Classification: Understand how problems are classified, the differences between each category, the diagram (very important), and examples of each class.

  • End Advice: Please talk to your teacher regarding this unit; otherwise, the night before the exam you'll have nightmares about NP-Hard.

Examination Discourse

§ Mid-Semester Thesis

Focus on:

  • Time complexity finding
  • Master's Method
  • Sorting (especially Heap, Counting)
  • KMP and Boyer-Moore
  • Red-Black and AVL Trees

§ End-Semester Thesis

Most important topics:

  • Prim's
  • Kruskal's
  • Dijkstra
  • 0/1 Knapsack
  • Heap Sort
  • Topological Sort
  • LCS

Avoid (if low on time):

  • MCM
  • Floyd-Warshall (lengthy to study and solve)

(Always confirm the syllabus with your teacher.)

Previous Year Questions

Curated by Aryan Anand