DSA Genesis is my personal, structured repository for everything related to Data Structures & Algorithms at BUET. It spans two semesters β from C++ fundamentals to advanced graph algorithms β and serves as both a learning journal and a reference archive.
This is not just code dumps. Each folder is organized to reflect the progression of a concept β from theory to implementation to problem-solving.
- Repository Structure
- Topics Covered β Level 1 (CSE-105)
- Topics Planned β Level 2 (CSE-207)
- How to Compile & Run
- Related Ecosystem
- References
- Contributing
- License
- Connect With Me
DSA_Genesis/
β
βββ 00_Basic_C++/ β C++ prerequisite refresher
β βββ 01_Intro/
β βββ 02_Loops/
β βββ 03_Pattern_Printing/
β βββ 04_1D_Arrays/
β βββ 05_2D_Arrays/
β βββ 06_Strings/
β βββ 07_Functions_&_Pointers/
β βββ 08_Time_&_Space_Complexity/
β βββ 09_Sorting/
β βββ 10_Math_Function_&_OOP/
β βββ 11_File_Handling/
β βββ Modern_Style_C++/
β
βββ 01_Foundation/ β Asymptotic Analysis, Big-O, Proofs
β
βββ 02_Sorting_Algorithms/ β Classic sorting algorithms & analysis
β
βββ 03_Data_Structures/ β Core linear and hierarchical structures
β βββ 01_Arrays/
β βββ 02_Linked_List/
β βββ 03_Stack/
β βββ 04_Queue/
β βββ 05_Binary_Tree/
β βββ 06_Binary_Search_Tree/
β βββ 07_Heap/
β βββ Max_Heap/
β βββ Min_Heap/
β
βββ 04_Advanced_Design_&_Analysis/ β Algorithm design paradigms
β βββ 01_Divide_and_Conquer/
β βββ 02_Dynamic_Programming/
β βββ 03_Greedy_Algorithms/
β
βββ 05_Advanced_Data_Structures/ β π§ AVL Tree, Red-Black Tree, Trie, Segment Tree, etc.
β
βββ 06_Graph_Algorithms/ β Complete graph theory coverage
β βββ 01_Representation/
β βββ 02_DFS/
β βββ 03_BFS/
β βββ 04_Shortest_Path/
β βββ 05_MST/
β βββ Graphs/
β
βββ 07_Miscellaneous/ β π§ Bit Manipulation, Number Theory, STL, etc.
β
βββ 08_Selected_Problems/ β Topic-wise practice problems
β βββ Linked_List/
β βββ Stack/
β βββ Queue/
β βββ Binary_Tree/
β βββ Heap/
β βββ Graph/
β
βββ 10_Previous_Batches_Online/ β Past Online Exam Solutions (Batch 22)
β
βββ DSA_QB_BUET_TF.pdf β BUET DSA Question Bank
Prerequisite refresher covering modern C++ used throughout the repo.
| Folder | Contents |
|---|---|
01_Intro/ |
Basic I/O, control flow |
02_Loops/ |
Iterative patterns |
03_Pattern_Printing/ |
Triangle, diamond, number patterns |
04_1D_Arrays/ |
Declaration, traversal |
05_2D_Arrays/ |
Matrix operations |
06_Strings/ |
string, char[], STL functions |
07_Functions_&_Pointers/ |
Pass by value/reference, pointer arithmetic |
08_Time_&_Space_Complexity/ |
Big-O analysis |
09_Sorting/ |
Basic sorting implementations |
10_Math_Function_&_OOP/ |
Classes, objects, cmath functions |
11_File_Handling/ |
fstream, reading/writing files |
Modern_Style_C++/ |
auto, range-for, lambdas, STL containers |
Asymptotic analysis notes and proofs.
- Asymptotic Notations (
$O$ ,$\Omega$ ,$\Theta$ ,$o$ ,$\omega$ ) - Loop Analysis Patterns
- Recurrence Relations (Master Theorem, Recursion Tree)
Six sorting algorithm implementations with complexity analysis.
- Insertion Sort
- Merge Sort
- Quick Sort
- Counting Sort
- Radix Sort
- Bucket Sort
Hierarchical folder structure for linear and tree-based data structures.
| Folder | Sub-folders & Contents |
|---|---|
01_Arrays/ |
Insert, Delete, SubArray operations |
02_Linked_List/ |
Singly LL, Doubly LL implementations |
03_Stack/ |
Array-based, Vector-based, Linked-List-based, STL |
04_Queue/ |
Array Queue, Linked-List Queue, deque, STL |
05_Binary_Tree/ |
PreOrder, InOrder, PostOrder, LevelOrder traversals |
06_Binary_Search_Tree/ |
Build, Search, Insert, Min/Max |
07_Heap/ |
Max_Heap/ (Insert, Extract-Max), Min_Heap/ (Insert, Extract-Min) |
Algorithm design paradigms with implementations.
| Folder | Contents |
|---|---|
01_Divide_and_Conquer/ |
Binary Search, FindMax/FindMin, Merge Sort |
02_Dynamic_Programming/ |
Climbing Stairs, Rod Cutting, LCS, Edit Distance, MCM, 0-1 Knapsack |
03_Greedy_Algorithms/ |
Activity Selection, Fractional Knapsack |
Full graph coverage with implementations.
| Folder | Contents |
|---|---|
01_Representation/ |
Adjacency Matrix, Adjacency List, Edge List |
02_DFS/ |
Recursive & iterative DFS, Cycle detection, Connected components |
03_BFS/ |
Level-order traversal, 0-1 BFS, Cycle detection |
04_Shortest_Path/ |
Dijkstra's Algorithm (Min-heap implementation) |
05_MST/ |
Kruskal's (DSU), Prim's Algorithm |
Graphs/ |
Additional graph problems |
Practice problems organized by data structure.
| Folder | Problem Types |
|---|---|
Linked_List/ |
Reversal, Cycle Detection, Merge Sorted Lists |
Stack/ |
Valid Parentheses, Min Stack, Stock Span |
Queue/ |
Sliding Window Max, Generate Binary Numbers |
Binary_Tree/ |
Height, Diameter, LCA, Zigzag Traversal |
Heap/ |
Kth Largest, Merge K Sorted Lists, Task Scheduler |
Graph/ |
Number of Islands, Bipartite Check, Shortest Path |
- Sessional Problems: Section A, B, C's previous years online solution
| # | Folder | Status |
|---|---|---|
| 1 | 05_Advanced_Data_Structures/ β AVL, Red-Black, B-Trees, Trie, Segment Tree, Fenwick Tree |
π§ Upcoming |
| 2 | 07_Miscellaneous/ β Bit Manipulation, Number Theory |
π§ Upcoming |
| 3 | Advanced DP β TSP, Bitmask DP | π§ Upcoming |
| 4 | String Algorithms β KMP, Rabin-Karp | π§ Upcoming |
| 5 | Advanced Graph β Bellman-Ford, Floyd-Warshall, Topological Sort | π§ Upcoming |
All code is written in C++17. No external dependencies required.
Command line (GCC):
g++ -std=c++17 -O2 -Wall -o output filename.cpp
./outputVS Code: Install the C/C++ and Code Runner extensions, then press Ctrl+Alt+N.
Online: Compiler Explorer or OnlineGDB
| Repository | Description |
|---|---|
| π οΈ CSE_106 | DSA Sessional β lab tasks & evaluation code |
| π¦ OOPverse | Object-Oriented Programming concepts & lab |
| π¨ AlgoVista | Interactive visual dashboard for DSA |
| π§ Leetcode_Crunches | Hand-curated LeetCode problems on DSA topics |
- π Introduction to Algorithms β Cormen, Leiserson, Rivest, Stein (CLRS, 4th Ed.)
- π Grokking Algorithms β Aditya Y. Bhargava (2nd Ed.)
- π
DSA QB BUET_TF.pdfβ BUET DSA Question Bank (included in repo root) - π CP-Algorithms β Competitive programming algorithm reference
- π Visualgo β Visual algorithm & data structure animations
Contributions are welcome! If you'd like to contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this repository helpful, please give it a star! β