A collection of 103 C++ programs covering Data Structures and Algorithms — from basics to advanced topics.
CPP-DSA/
├── 01-Basics/ → Loops, counting, sum, fibonacci, etc.
├── 02-Patterns/ → Star patterns, pyramids, butterflies
├── 03-Functions/ → Function basics, overloading, call by ref
├── 04-Arrays/ → Searching, reversing, rotating arrays
├── 05-Vectors/ → Two sum, trapping rain water, kadane's algo
├── 06-Strings/ → Palindromes, roman numerals, sorting
├── 07-Sorting/ → Bubble, selection, insertion, merge sort
├── 08-Binary-Search/ → Sqrt, rotated array, aggressive cows
├── 09-2D-Arrays/ → Matrix ops, spiral, binary search in 2D
│ ├── 2D-Vector/ → Rotation, transpose, wave print
│ └── 2D-Binary-Search/ → Search in sorted 2D matrix
└── 10-Problems/ → Number systems, palindrome, leap year
| # | Topic | Files |
|---|---|---|
| 01 | Basics — Loops, Fibonacci, digit operations | 5 |
| 02 | Patterns — Star patterns & pyramids | 8 |
| 03 | Functions — Overloading, recursion, call by ref | 9 |
| 04 | Arrays — Search, reverse, rotate, min/max | 9 |
| 05 | Vectors — Two sum, rain water, subarrays | 12 |
| 06 | Strings — Palindrome, roman, panagram, sorting | 15 |
| 07 | Sorting — Bubble, Selection, Insertion, Merge | 4 |
| 08 | Binary Search — Sqrt, rotated array, cows | 10 |
| 09 | 2D Arrays — Matrix rotation, spiral, transpose | 19 |
| 10 | Problems — Number systems, complement, leap year | 12 |
# Compile and run any file
g++ -o output "07-Sorting/merge.cpp" && ./output
# Or if you have cpprun configured
cpprun "07-Sorting/merge.cpp"- C++ with Standard Library (
<iostream>,<vector>,<string>,<algorithm>)