Welcome to my Data Structures & Algorithms (DSA) repository! 🚀
This repository contains my topic-wise implementations and practice problems in C++, built to strengthen my problem-solving skills for:
- 💼 Coding Interviews
- 🏆 Competitive Programming
- 🧠 Core Computer Science Fundamentals
🛠️ Status: Actively maintained & Ongoing — I regularly add new problems, improve solutions, optimize time/space complexity, and refactor code for clarity.
The main goals of this repository are to:
- ✅ Build a strong foundation in Data Structures & Algorithms
- ✅ Practice standard, interview-level, and advanced problems
- ✅ Learn and compare multiple approaches:
- Brute Force
- Optimized
- Recursive / Iterative
- Greedy / DP / Backtracking, etc.
- ✅ Improve:
- Logical thinking
- Code quality
- Time & space optimization skills
- ✅ Maintain a clean, topic-wise revision guide for quick interview prep
Problems are grouped by concept, not by platform. Each folder focuses on one core DSA topic and contains:
- ✔️ Basic problems
- ✔️ Intermediate problems
- ✔️ Some advanced / tricky problems
- ✔️ Sometimes multiple approaches for the same problem
-
arraysAndVectors/
→ Searching, subarrays, rotations, two pointers, prefix sums, etc. -
StringProblems/
→ String parsing, pattern matching, anagrams, substrings, etc. -
Linklist/
→ Singly & doubly linked list, cycle detection, reversal, etc. -
stack/
→ Infix/Prefix/Postfix, next greater element, stack applications -
Queue/
→ Queue, Deque, Circular Queue, sliding window, reversals, etc. -
Heap/
→ MinHeap/MaxHeap, heap validation, priority queue problems -
set_map/
→ Frequency counting, hashing, distinct elements, window problems -
vectorProblems/
→ Vector manipulation and STL-based problem solving
- Binary Tree/
→ Traversals, properties, height, diameter, checks, etc.
📌 Graph problems will be added in future.
-
BinarySearch/
→ Classic binary search + variations (first/last occurrence, etc.) -
SortingAlgorithm/
→ Bubble, Selection, Insertion, Merge, Quick, and applications
-
Recursion/
→ Recursion basics, recursion trees, classic recursive problems -
Backtracking/
→ N-Queens, Sudoku Solver, Rat in a Maze, permutations, etc. -
DP/
→ Memoization, tabulation, optimization (e.g., cuboid stacking, etc.) -
Greedy/
→ Interval problems, scheduling, optimization strategies -
sliding window/
→ Fixed & variable window problems -
prefixSum/
→ Range queries, subarray sum problems -
Bits Operator/
→ Bit manipulation tricks, masks, XOR problems -
math & PrimeNumber/
→ Prime checking, GCD, LCM, number theory basics
-
basic/
→ C++ fundamentals, loops, conditions, simple logic -
oop/
→ Classes, objects, encapsulation, basic OOP concepts
- 2DArray/
→ Matrix traversal, grid problems, row/column logic
- Language: C++
- Standard: Mostly C++17 / C++20
- Compiler: GCC / MinGW
- IDE: VS Code
- Style Focus:
- Readable code
- Clear logic
- Proper function structure
- Correctness first, then optimization
Example:
g++ filename.cpp -o output
./output