This repository contains my DSA practice solutions collected while solving problems from:
- GeeksforGeeks (GFG)
- LeetCode
- My DSA batch / course practice
Most solutions are written in C++, and wherever applicable I also practice in Python.
The code is organized by data structure / algorithm topic:
-
Arrays/
Common array problems and patterns (searching, permutations, rotations, etc.) -
BinarySearch/
Binary search patterns and classic questions -
String/
String fundamentals + pattern based problems -
Recursion/
Basic to intermediate recursion practice -
BasicSortingAlgorithms/
Fundamental sorting techniques -
AdvancedSortingAlgorithm/
Advanced sorting / sorting-based patterns -
MultiDimensionalArray/
2D/Matrix type questions -
Sets/andMaps/
STL-based practice, frequency maps, set usage, etc. -
BinaryTrees/andBST/
Tree traversals, BST operations, and standard questions -
Graph/
Graph implementation + core algorithms (traversals, DSU, shortest path, MST, etc.)
Inside Arrays/ you’ll find folders for specific problem types, for example:
LargestElement/SecondLargestElement/ReverseArray/RotateArray/Linear_Search/MergeSortedArray/NextPermutation/TrappingRainWater/specializedSortProblems/
These are mostly based on popular interview + competitive programming patterns.
Graph/ contains implementations and standard graph algorithms/patterns like:
- Traversals (BFS/DFS)
- Connected Components
- Cycle Detection (Undirected)
- DSU (Disjoint Set Union / Union-Find)
- Shortest Path
- MST (Minimum Spanning Tree)
- Topological Sort
Implementation/
There is also a small STL practice file:
Graph/Built-InLinkedList_Practice.cpp
Tip: If you see any compiled binaries like
.exe, it’s better to remove them from GitHub and add them to.gitignore.
- C++ (primary)
- Python (whenever I practice the same question in Python as well)
g++ filename.cpp -o app
./apppython filename.py- Build strong fundamentals in DSA
- Practice frequently asked patterns from GFG / LeetCode
- Keep a clean, topic-wise archive of solutions for revision
- Folder names reflect the problem/topic.
- Solutions may include multiple approaches as I improve over time.
This is a personal practice repository, but if you want to suggest improvements (better naming, removing binaries, adding problem links), feel free to open a PR.