Design and Analysis of Algorithms
My Design and Analysis of Algorithms course work – 22 lectures, assignments with C++ solutions, a data-structures project, past papers, practice problems and study notes.
Live Links
| What | Link |
|---|---|
| Repository | https://github.com/rohaan2802/Algorithm_Repo |
| Website (GitHub Pages) | https://rohaan2802.github.io/Algorithm_Repo/ |
| Download whole repository (ZIP) | https://github.com/rohaan2802/Algorithm_Repo/archive/refs/heads/main.zip |
Overview
Design and Analysis of Algorithms (CS-2009) at FAST-NUCES Islamabad, Fall 2025. The repository has 22 lectures, three assignments with my C++ solutions, the Merkle tree, treap and heap project, past papers, practice problems, two textbooks and my study notes.
Analysis
Asymptotic notation, recurrences, recursion trees and the master method.
Sorting
Insertion, merge, quick and heap sort, and counting and radix sort in linear time.
Strings & graphs
Naïve, Rabin–Karp, automata and KMP matching; BFS, DFS, MST, Dijkstra, Bellman–Ford, Floyd–Warshall.
Greedy & DP
Activity selection, Huffman codes, matrix-chain, 0/1 knapsack, rod cutting and LCS.
Lectures
22 lectures from complexity analysis to Floyd–Warshall. Every file opens on GitHub, where PDFs preview in the browser.
01Introduction
02Complexity analysis
03Insertion sort
04Recursion and recurrences
05Quick sort
06Heap sort
07Sorting in linear time
08-09String matching I
10String matching II
11String matching III
12Graph theory I
13Graph theory II
14Minimum spanning trees
15Dijkstra's algorithm
16Bellman–Ford
17Greedy algorithms
18Dynamic programming
19Matrix-chain multiplication
200/1 knapsack
21Longest common subsequence
22All-pairs shortest paths
Books & Notes
Handwritten notes, my study notes in Markdown and the course textbooks.
NStudy notes
Open Notes on GitHub · 53 files
- 0-1-Knapsack.md
- Algorithm Notes.pdf
- Animation Leaf Nodes.txt
- Capture.PNG
- Complexity-Bounds-and-Nested-Loops.md
- DP-Top-Down-vs-Bottom-Up.md
- Graph-Convergence-and-Negative-Cycles.md
- Greedy-Heuristic-Brute-Force.md
- Huffman-Coding.md
- IMG-20250918-WA0010.jpg
- IMG-20250918-WA0011.jpg
- IMG-20250918-WA0012.jpg
- IMG-20250918-WA0024.jpg
- IMG-20250918-WA0025.jpg
- IMG-20250918-WA0026.jpg
- IMG-20250920-WA0001.jpg
- IMG-20250920-WA0002.jpg
- IMG-20250922-WA0010.jpg
- IMG-20250922-WA0011.jpg
- IMG-20250922-WA0012.jpg
- Rod-Cutting-DP.md
- Screenshot_20260517_111807.jpg
- Shortest-Paths-with-Negative-Weights.md
- Square-Root-Time-Complexity.md
- Swap-Methods-in-CPP.md
- WhatsApp Image 2025-12-13 at 2.09.31 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.31 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.31 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.32 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.32 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.32 AM (3).jpeg
- WhatsApp Image 2025-12-13 at 2.09.32 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.33 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.33 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.33 AM (3).jpeg
- WhatsApp Image 2025-12-13 at 2.09.33 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.34 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.34 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.34 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.35 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.35 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.35 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.36 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.36 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.36 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.37 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.37 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.37 AM (3).jpeg
- WhatsApp Image 2025-12-13 at 2.09.37 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.38 AM (1).jpeg
- WhatsApp Image 2025-12-13 at 2.09.38 AM (2).jpeg
- WhatsApp Image 2025-12-13 at 2.09.38 AM.jpeg
- WhatsApp Image 2025-12-13 at 2.09.39 AM.jpeg
Assignments, Project & Papers
Assignments with my C++ solutions, the semester project, past papers and practice problems.
AAssignments
A3Assignment 3 code
Open 22i_2327_A3_Sec_D on GitHub · 17 files
- 22i-2327_A#03_Sec_D.pdf
- Q_01_Sol/Q_01_Sol.sln
- Q_01_Sol/Q_01_Sol.vcxproj
- Q_01_Sol/Q_01_Sol.vcxproj.filters
- Q_01_Sol/Source.cpp
- Q_02_Sol/Q_02_Sol.sln
- Q_02_Sol/Q_02_Sol.vcxproj
- Q_02_Sol/Q_02_Sol.vcxproj.filters
- Q_02_Sol/Source.cpp
- Q_03_Sol/Q_03_Sol.sln
- Q_03_Sol/Q_03_Sol.vcxproj
- Q_03_Sol/Q_03_Sol.vcxproj.filters
- Q_03_Sol/Source.cpp
- Q_04_Sol/Q_04_Sol.sln
- Q_04_Sol/Q_04_Sol.vcxproj
- Q_04_Sol/Q_04_Sol.vcxproj.filters
- Q_04_Sol/Source.cpp
PProject
DProject data
EPast papers
Open Papers on GitHub · 10 files
- Algo Final Exam (Fall-2022).pdf
- Algo Final Exam (Solution) (Fall-2023).pdf
- Algo Final Exam (Solution) (Spring-2022).pdf
- Algo Final Exam (Solution) (Summer-2023).pdf
- Algo Final Exam (Solution)_2.pdf
- Algo Final Exam.pdf
- DAA Final Fall 2024 SOL.pdf
- DAA FINALS MERGED.pdf
- Final-Exam- Solution.pdf
- Solution Sessional - I AlgoF25.pdf
PPPractice problems
Open Practice Problems on GitHub · 11 files
- Binary-Tree-Traversals.md
- dynamic programming practice.pdf
- Formula- Guide.pdf
- IMG-20251217-WA0026.jpg
- IMG-20251217-WA0029.jpg
- IMG-20251217-WA0033.jpg
- Insertion-and-Selection-Sort.md
- Log-Identity-Proof.md
- Matrix-Chain-Multiplication.md
- Practice Problems-Recurrence Relation- Master Method.pdf
- WhatsApp Image 2025-12-16 at 7.37.23 PM.jpeg
Screenshots
30 snapshots from across the repository. Click any image to enlarge it, use the arrow keys to move between images, or swipe on a phone.
No screenshots match your search.
Folder Structure
Algorithm_Repo/ │ └── Heap Part Data/ (3 files) ├── ALGO_PROJECT/ (7 files) │ └── 22i_2327_A3_Sec_D/ (17 files) ├── Assignments/ (5 files) ├── Books/ (2 files) ├── Lecture #01/ (2 files) ├── Lecture #02/ (1 file) ├── Lecture #03/ (1 file) ├── Lecture #04/ (5 files) ├── Lecture #05/ (1 file) ├── Lecture #06/ (1 file) ├── Lecture #07/ (1 file) ├── Lecture #08-09/ (1 file) ├── Lecture #10/ (1 file) ├── Lecture #11/ (1 file) ├── Lecture #12/ (1 file) ├── Lecture #13/ (1 file) ├── Lecture #14/ (1 file) ├── Lecture #15/ (1 file) ├── Lecture #16/ (1 file) ├── Lecture #17/ (1 file) ├── Lecture #18/ (1 file) ├── Lecture #19/ (1 file) ├── Lecture #20/ (1 file) ├── Lecture #21/ (1 file) ├── Lecture #22/ (1 file) ├── Notes/ (53 files) ├── Papers/ (10 files) ├── Practice Problems/ (11 files) │ └── String_Matching_Program/ (4 files) ├── assets/ │ ├── screenshots/ 30 images │ ├── thumbs/ gallery previews │ └── css/ js/ website ├── index.html ├── .gitattributes ├── .gitignore ├── .nojekyll ├── LICENSE └── README.md
Get the Files
Clone everything with Git, or download the ZIP from the Live Links.
Clone the repository
git clone https://github.com/rohaan2802/Algorithm_Repo.gitBuild a C++ solution (any compiler)
g++ -std=c++17 -O2 "Assignments/22i_2327_A3_Sec_D/Q_01_Sol/Source.cpp" -o q1 && ./q1Each .sln file opens its project in Visual Studio (Desktop development with C++). Build output folders such as .vs, x64 and Debug are not stored; Visual Studio recreates them on the first build.
License
Lecture slides, exam papers, assignment statements and textbooks belong to their instructors at FAST-NUCES and to their authors and publishers. They are shared here only for learning and revision – see LICENSE. My own notes, code and the organisation of this repository are free to use for study.