Skip to content

BadhonPain/DSA_Genesis

Repository files navigation

Typing SVG

Language Course L1 Status L2 Status University


"First, understand the structure. Then, master the algorithm."


🧭 What is DSA Genesis?

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.


πŸ“‘ Table of Contents


πŸ“‚ Repository Structure

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

πŸ“˜ Topics Covered β€” Level 1 (CSE-105)

00 Β· C++ Fundamentals

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

01 Β· Foundation

Asymptotic analysis notes and proofs.

  • Asymptotic Notations ($O$, $\Omega$, $\Theta$, $o$, $\omega$)
  • Loop Analysis Patterns
  • Recurrence Relations (Master Theorem, Recursion Tree)

02 Β· Sorting Algorithms

Six sorting algorithm implementations with complexity analysis.

  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Counting Sort
  • Radix Sort
  • Bucket Sort

03 Β· Core Data Structures

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)

04 Β· Advanced Design & Analysis

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

06 Β· Graph Algorithms

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

08 Β· Selected 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

10 Β· Previous Batches Online's

  • Sessional Problems: Section A, B, C's previous years online solution

πŸ—ΊοΈ Topics Planned β€” Level 2 (CSE-207)

# 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

βš™οΈ How to Compile & Run

All code is written in C++17. No external dependencies required.

Command line (GCC):

g++ -std=c++17 -O2 -Wall -o output filename.cpp
./output

VS Code: Install the C/C++ and Code Runner extensions, then press Ctrl+Alt+N.

Online: Compiler Explorer or OnlineGDB


πŸ”— Related Ecosystem

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

πŸ“Ž References

  • πŸ“– 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

🀝 Contributing

Contributions are welcome! If you'd like to contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ“¬ Connect With Me

GitHub LinkedIn Email


🌟 Star History

Star History Chart

If you find this repository helpful, please give it a star! ⭐


Visitor Count


Made with 🧠 by Badhon Pain

About

🧬 DSA Genesis | Data Structures & Algorithms at BUET CSE | CSE-105 (L1T2) β†’ CSE-207 (L2T1) | C++17 implementations spanning sorting, trees, graphs, DP & more

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors