- Day 001 - Basic C++ Syntax and Introduction - 21 April, 2025
- Day 002 - First Program and Comments - 22 April, 2025
- Day 003 - Variables, Data Types, and I/O - 23 April, 2025
- Day 004 - Input/Output and Operators - 24 April, 2025
- Day 005 - If-Else and Switch Statements - 25 April, 2025
- Day 006 - Loops and Their Types - 26 April, 2025
- Day 007 - Functions and Pointers - 27 April, 2025
- Day 008 - Scope and Basic Functions - 28 April, 2025
- Day 009 - Pattern Problems - 29 April, 2025
- Day 010 - Bitwise Operators - 30 April, 2025
Welcome to my DSA learning repository! Here I document my journey of solving LeetCode problems and mastering data structures and algorithms.
Day 11 View Code - 01 May, 2025
- Array Problems
- 1. Two Sum (LeetCode) - Easy (C++ Solution)
- 3550. Smallest Index With Digit Sum Equal to Index (LeetCode) - Easy (C++ Solution)
Day 12 View Code - 02 May, 2025
- Matrix Problems
- 1572. Matrix Diagonal Sum (LeetCode) - Easy (C++ Solution)
Day 13 View Code - 03 May, 2025
- Binary Search Problems
- First and Last Occurrence (Coding Ninjas) - Easy (C++ Solution)
- 724. Find Pivot Index (LeetCode) - Easy (C++ Solution)
- 852. Peak Index in a Mountain Array (LeetCode) - Medium (C++ Solution)
- Binary Search Implementation (C++ Solution)
Day 14 View Code - 04 May, 2025
- Rotated Array Problems
- Pivot in Rotated Array (C++ Solution)
- 33. Search in Rotated Sorted Array (LeetCode) - Medium (C++ Solution)
- Find if Given Element Present in Rotated Array (C++ Solution)
- Square Root Using Binary Search (C++ Solution)
Day 15 View Code - 05 May, 2025
- Square Root Problems
- Square Root with Decimal Precision (GeeksForGeeks) - Medium (C++ Solution)
Day 16 View Code - 06 May, 2025
- Binary Search Problems
- Book Allocation Problem (GeeksForGeeks) - Medium (C++ Solution)
- Painter's Partition Problem (C++ Solution)
Day 17 View Code - 07 May, 2025
- Advanced Search Problems
- Aggressive Cows (GeeksForGeeks) - Medium
- EKO - Wood Cutting (SPOJ) - Medium
Day 18 View Code - 08 May, 2025
- SPOJ Problems
- PRATA - Roti Prata (SPOJ) - Medium
Day 19 View Code - 09 May, 2025
- Basic Sorting Algorithms
- Selection Sort (GeeksForGeeks) - Easy
- Bubble Sort (GeeksForGeeks) - Easy
Day 20 View Code - 10 May, 2025
- Sorting Algorithms
- Insertion Sort (GeeksForGeeks) - Easy
Day 21 View Code - 11 May, 2025
- STL Data Structures
-
- Vector (Dynamic Array)
- Definition: A dynamic array that can grow/shrink in size
- Use Cases: Dynamic size collections, frequent access by index
- Key Methods:
- push_back() - Add element at end
- pop_back() - Remove last element
- size() - Get current size
- capacity() - Get current capacity
- clear() - Remove all elements
- Stack (LIFO)
- Definition: Last-In-First-Out data structure
- Use Cases: Function calls, undo operations, expression evaluation
- Key Methods:
- push() - Add element on top
- pop() - Remove top element
- top() - Access top element
- empty() - Check if stack is empty
- Queue (FIFO)
- Definition: First-In-First-Out data structure
- Use Cases: Print spooler, task scheduling, BFS algorithms
- Key Methods:
- push() - Add element at back
- pop() - Remove front element
- front() - Access first element
- back() - Access last element
- List (Doubly Linked List)
- Definition: Double-linked list with nodes containing prev/next pointers
- Use Cases: Frequent insertions/deletions at any position
- Key Methods:
- push_back() - Add at end
- push_front() - Add at beginning
- insert() - Add at position
- erase() - Remove element
- Deque (Double-ended Queue)
- Definition: Double-ended queue allowing insertions/deletions at both ends
- Use Cases: Sliding window problems, work stealing algorithms
- Key Methods:
- push_back() - Add at back
- push_front() - Add at front
- pop_back() - Remove from back
- pop_front() - Remove from front
- Array (Fixed-size Array)
- Definition: Fixed-size container with contiguous memory
- Use Cases: When size is known and fixed, cache-friendly operations
- Key Methods:
- at() - Access with bounds checking
- front() - Access first element
- back() - Access last element
- fill() - Fill array with value
- size() - Get array size
- Vector (Dynamic Array)
Day 22 View Code - 12 May, 2025
- Advanced STL
-
- Priority Queue
- Definition: A container adaptor that provides constant time lookup of the largest/smallest element
- Use Cases: Task scheduling, Dijkstra's algorithm
- Key Methods:
- push() - Add element
- pop() - Remove top element
- top() - Access top element
- empty() - Check if empty
- Set
- Definition: Sorted container that stores unique elements
- Use Cases: Maintaining unique elements, ordered data
- Key Methods:
- insert() - Add element
- erase() - Remove element
- find() - Search element
- count() - Count occurrences
- Map
- Definition: Sorted key-value pair container
- Use Cases: Dictionaries, frequency counting
- Key Methods:
- insert() - Add pair
- erase() - Remove pair
- find() - Search key
- [] - Access/modify value
- STL Algorithms
- Definition: Common algorithms for containers
- Key Functions:
- sort() - Sort elements
- binary_search() - Binary search
- reverse() - Reverse elements
- min/max_element() - Find min/max
- Priority Queue
Day 23 View Code - 13 May, 2025
- Array Manipulation
- Reverse Array from Position M (GeeksForGeeks) - Easy
Day 24 View Code - 14 May, 2025
- Array Problems
- Merge Sorted Arrays (LeetCode) - Easy
- Move Zeroes (LeetCode) - Easy
Day 25 View Code - 15 May, 2025
- Array Rotation Problems
- Rotate Array (LeetCode) - Medium
- Check if Array is Sorted and Rotated (LeetCode) - Easy
Day 26 View Code - 16 May, 2025
- Array Addition
- Sum of Two Arrays - Easy
Day 27 View Code - 17 May, 2025
- Character Arrays & Strings
-
Character Arrays
- Definition: Fixed-size array to store sequence of characters
- Declaration & Initialization:
char str[10] = "hello"; // Method 1 char str[] = {'h','e','l','l','o','\0'}; // Method 2
- Common Operations:
- Length: strlen(str)
- Copy: strcpy(dest, src)
- Compare: strcmp(str1, str2)
- Concatenate: strcat(str1, str2)
- Limitations:
- Fixed size
- Manual null termination
- No built-in operations
-
String Class
- Definition: Dynamic string container with built-in methods
- Declaration & Initialization:
string str = "hello"; // Method 1 string str("hello"); // Method 2
- Most Used Methods:
- str.length() / str.size() - Get length
- str1 + str2 - Concatenate
- str.substr(pos, len) - Get substring
- str.find("pattern") - Search pattern
- getline(cin, str) - Input with spaces
-
Solved Problems:
- Check Palindrome - Easy
- Reverse String (LeetCode) - Easy
- Rotate String (LeetCode) - Easy
- Median of Two Sorted Arrays (LeetCode) - Hard
Day 28 View Code - 18 May, 2025
- Array Properties
- Monotonic Array (LeetCode) - Easy
Day 29 View Code - 19 May, 2025
- String Manipulation
- Reverse Words in String (LeetCode) - Medium
Day 30 View Code - 20 May, 2025
- String Manipulation Problems
- Maximum Occurring Character (GeeksForGeeks) - Easy
- Replace Spaces with @40 (Naukri Code360) - Easy
- Remove All Occurrences of a Substring (LeetCode) - Medium
- Permutation in String (LeetCode) - Medium
- Remove Adjacent Duplicates (LeetCode) - Easy
Day 31 View Code - 21 May, 2025
- String Compression
- String Compression (LeetCode) - Medium
Day 32 View Code - 22 May, 2025
- Search a 2D Matrix (LeetCode) - Medium
- Transpose Matrix (LeetCode) - Easy
- Convert 1D Array Into 2D Array (LeetCode) - Easy
Day 33 View Code - 23 May, 2025
- Print Like A Wave (Naukri Code360) - Medium
Day 34 View Code - 24 May, 2025
- 2D Matrix Problems
- 48. Rotate Image (LeetCode) - Medium (C++ Solution)
- 54. Spiral Matrix (LeetCode) - Medium (C++ Solution)
- 240. Search a 2D Matrix II (LeetCode) - Medium (C++ Solution)
- 2942. Find Words Containing Character (LeetCode) - Easy (C++ Solution)
Day 35 View Code - 25 May, 2025
- Number Theory & Sieve Problems
- 204. Count Primes (LeetCode) - Medium (C++ Solution)
- 7. Reverse Integer (LeetCode) - Easy (C++ Solution)
- Regular Sieve of Eratosthenes vs Segmented Sieve (C++ Solution)
- HCM (Highest Common Factor) Algorithm (C++ Solution)
Day 36 View Code - 26 May, 2025
- Math & Advanced Problems
- 50. Pow(x, n) (LeetCode) - Medium (C++ Solution)
- Catalan Number Implementations (C++ Solution)
Day 37 View Code - 27 May, 2025
- C++ Pointers & LeetCode
- Pointers in C++ (C++ Solution)
- 2894. Divisible and Non-divisible Sums Difference (LeetCode) - Easy (C++ Solution)
Resources:
-
Code Examples: Memory allocation, Smart pointers
-
Topics: C++ Memory Management, Smart Pointers, Dynamic Memory
-
Difficulty: Intermediate
-
Language: C++
Day 38 View Code - 28 May, 2025
- C++ References & Dynamic Memory
- Reference Variables (C++ Solution)
- Dynamic Memory Allocation (C++ Solution)
- 2D Array Dynamic Allocation (C++ Solution)
- 26. Remove Duplicates from Sorted Array (LeetCode) - Easy (C++ Solution)
Resources:
Day 39 View Code - 29 May, 2025
Problems Solved:
-
Sqrt(x) (LeetCode) - Easy
-
Spiral Matrix II (LeetCode) - Medium
-
Language: C++
Day 40 View Code - 30 May, 2025
- Container With Most Water (LeetCode) - Medium
Day 41 View Code - 31 May, 2025
- C++ Macros Deep Dive
- Object-like Macros
- Function-like Macros
- Multi-line Macros
- Conditional Compilation
- Stringizing & Token Pasting
- Predefined Macros
- Implementation: macros.cpp
- Topic: C++ Preprocessor Directives
- Difficulty: Intermediate
- Language: C++
Day 42 View Code - 1 june
- Fibonacci Number (LeetCode) - Easy
Day 43 View Code - 2 june
- Candy Distribution (LeetCode) - Hard
- Add Strings (LeetCode) - Easy
Day 44 View Code - 3 june
- Mathematical Algorithms & Optimizations
-
Multiply Strings (LeetCode) - Medium
-
Sum Multiples (LeetCode) - Easy
Day 45 View Code - 4 june
- Array In-Place Operations
- Remove Element (LeetCode) - Easy
Day 46 View Code - 5 june, 2025
- Search Insert Position (LeetCode) - Easy
Day 47 View Code - 6 june, 2025
- Find First and Last Position (LeetCode) - Medium
Day 48 View Code - 7 june, 2025
- Length of Last Word (LeetCode) - Easy
Day 49 View Code - 8 june, 2025
- Plus One (LeetCode) - Easy
Day 50 View Code - 9 june, 2025
- Add Binary (LeetCode) - Easy
Day 51 View Code - 10 june, 2025
- Maximum Difference Between Even and Odd Frequency (LeetCode) - Easy
Day 52 View Code - 11 june, 2025
- Best Time to Buy and Sell Stock (LeetCode) - Easy
Day 53 View Code - 12 june, 2025
- Maximum Difference Between Adjacent Elements in a Circular Array (LeetCode) - Easy
Day 54 View Code - 13 june, 2025
- Contains Duplicate (LeetCode) - Easy
Day 55 View Code - 14 june, 2025
- Longest Common Prefix (LeetCode) - Easy
Day 56 View Code - 15 june, 2025
- Longest Substring Without Repeating Characters (LeetCode) - Medium
Day 57 View Code - 16 june, 2025
- Maximum Difference Between Increasing Elements (LeetCode) - Easy
Day 58 View Code - 17 june, 2025
- Valid Parentheses (LeetCode) - Easy
Day 59 View Code - 18 june, 2025
- Single Number (LeetCode) - Easy
Day 60 View Code - 19 june, 2025
- Majority Element (LeetCode) - Easy
Day 61 View Code - 20 june, 2025
- Excel Sheet Column Title (LeetCode) - Easy
- Recursion Problems: Array Sum, Linear Search, Binary Search
- Topic: Recursion in Arrays
- Problems:
- Sum of Array Elements (Recursive)
- Linear Search (Recursive)
- Binary Search (Recursive)
- Language: C++
- Key Concepts:
- Recursion
- Divide and Conquer
- Array Traversal
- Time: O(n) for sum/linear search, O(log n) for binary search
- Space: O(n) for sum/linear search, O(log n) for binary search
Day 62 View Code - 21 june, 2025
- 3Sum (LeetCode) - Medium
- Generate Tag for Video Caption (LeetCode) - Easy
Day 63 View Code - 22 june, 2025
- Power of Three (LeetCode) - Easy
- bubble sorting using recursion.
- string and some integer related recursion problems.
Day 64 View Code - 23 june, 2025
- Insertion Sort using Recursion (LeetCode) - Medium
- Selection Sort using Recursion (LeetCode) - Medium
- Merge Sort using Recursion (LeetCode) - Medium
- Power of Four (LeetCode) - Easy
Day 65 View Code - 24 june, 2025
- Quick Sort using Recursion (LeetCode) - Medium
- Excel Sheet Column Number (LeetCode) - Easy
| Algorithm | Best Time | Average Time | Worst Time | Space | Stable | Best For |
|---|---|---|---|---|---|---|
| Selection Sort | O(n^2) | O(n^2) | O(n^2) | O(1) | No | Small arrays, when memory is very limited |
| Bubble Sort | O(n) | O(n^2) | O(n^2) | O(1) | Yes | Educational, nearly sorted arrays |
| Insertion Sort | O(n) | O(n^2) | O(n^2) | O(1) | Yes | Small/nearly sorted arrays, online sorting |
| Merge Sort | O(n log n) | O(n log n) | O(n log n) | O(n) | Yes | Large arrays, stable sort needed |
| Quick Sort | O(n log n) | O(n log n) | O(n^2) | O(log n)* | No | General purpose, fastest in practice |
*Quick sort's space is O(log n) due to recursion stack (in-place otherwise).
Summary:
- Merge Sort is best for large datasets and when stability is required.
- Quick Sort is usually fastest for general use, but not stable and can degrade to O(n^2).
- Insertion Sort is best for small or nearly sorted arrays.
- Bubble/Selection Sort are mainly for teaching or very small arrays.
Day 66 View Code - 25 june, 2025
- Missing Number (LeetCode) - Easy
Day 67 View Code - 26 june, 2025
- subsets (LeetCode) - Medium
- subsequence of a string (Naukri Code360)
Day 68 View Code - 27 june, 2025
- Permutations (LeetCode) - Medium
- Letter Combinations of a Phone Number (LeetCode) - Medium
Day 69 View Code - 28 june, 2025
- Rat in a Maze (GeeksForGeeks) - Medium
- Divide Two Integers (LeetCode) - Medium
Day 70 View Code - 29 june, 2025
- day problem Add Digits (LeetCode) - Easy (C++ Solution)
- OOPS Concepts, Examples, and Explanations
Day 71 View Code - 30 june, 2025
- day problem Zigzag Conversion (LeetCode) - Medium (C++ Solution)
Day 72 View Code - 1 July, 2025
- Linked List Implementations (Singly, Doubly, Circular Singly, Circular Doubly)
- LinkedList Concepts, Examples, and Explanations
- Find the Original Typed String I (LeetCode) - Easy (C++ Solution)
Day 73 View Code - 2 July, 2025
- LeetCode Linked List Problems (Reverse, Remove Nth, Palindrome, Design)
- Linked List Problem Approaches and Solutions
- 206. Reverse Linked List (C++ Solution)
- 19. Remove Nth Node From End of List (C++ Solution)
- 234. Palindrome Linked List (C++ Solution)
- 707. Design Linked List (C++ Solution)
Day 74 View Code - 3 July, 2025
- Linked List Problems
- 876. Middle of the Linked List (LeetCode) - Easy (C++ Solution)
- Approaches: Vector, Counting, Two Pointers (see README)
- Reverse Doubly Linked List (C++ Solution)
- Approach: Swap next/prev pointers for each node (see README)
Day 75 View Code - 4 July, 2025
- Linked List Advanced Problems
- 25. Reverse Nodes in k-Group (LeetCode) - Hard (C++ Solution, Detailed Discussion & Visuals)
- 141. Linked List Cycle (LeetCode) - Easy (C++ Solution, See README)
- 142. Linked List Cycle II (LeetCode) - Medium (C++ Solution, See README)
Day 76 View Code - 5 July, 2025
- Array Problems
- 1394. Find Lucky Integer in an Array (LeetCode) - Easy (C++ Solution, Detailed Discussion & Visuals)
Day 77 View Code - 6 July, 2025
- Linked List - Remove Duplicates & Loops
- 83. Remove Duplicates from Sorted List (LeetCode) - Easy (C++ Solution, See README)
- 82. Remove Duplicates from Sorted List II (LeetCode) - Medium (C++ Solution, See README)
- Remove Loop in Linked List (GFG) - Medium (C++ Solution, See README)
Day 78 View Code - 7 July, 2025
- Linked List Practice & Sorting
- Merge Two Sorted Lists (LeetCode) - Easy (C++ Solution)
- Sort Colors (LeetCode) - Medium (C++ Solution)
- Sort linked list of 0s 1s 2s (Coding Ninjas) - Easy (C++ Solution)
- Remove duplicates from an unsorted linked list (GFG) - Easy (C++ Solution)
Day 79 View Code - 8 July, 2025
- Linked List Advanced Problems
- 2. Add Two Numbers (LeetCode) - Medium (C++ Solution)
- 138. Copy List with Random Pointer (LeetCode) - Medium (C++ Solution)
Day 80 View Code - 9 July, 2025
- 430. Flatten a Multilevel Doubly Linked List(LeetCode) - Medium(C++ Solution)
- 148. Sort List(LeetCode) - Medium (C++ Solution)
Day 81 View Code - 10 July , 2025
- Linked List Problems
- 61. Rotate List (LeetCode) - Medium (C++ Solution)
A modern, STL-style circular doubly-linked list implemented from scratch:
- Supports push_back, insert, erase, reverse, rotate, sort, clear, size, empty, head, tail
- STL-style iterators: begin(), end(), at(index), cycle_begin() for infinite traversal
- Fully documented and tested
- See day_081/circular_list_STL/README.md for full details, usage, and examples
- Try the demo or run the unit tests
Day 82 View Code - 11 July , 2025
- 70. Climbing Stairs (LeetCode) - Easy (C++ Solution)
- 155. Min Stack (LeetCode) - Medium (C++ Solution)
- Two Stacks in an Array (Coding Ninjas) - Medium (C++ Solution)
- Stack Implementation using Array (C++ Solution)
- Stack Implementation using Linked List (C++ Solution)
Day 83 View Code - 12 July , 2025
- 2095. Delete the Middle Node of a Linked List (LeetCode) - Medium (C++ Solution)
- 1381. Design a Stack With Increment Operation (LeetCode) - Medium (C++ Solution)
- 3606. Coupon Code Validator (LeetCode) - Easy (C++ Solution)
- Delete Middle Element of a Stack (GeeksForGeeks) - Medium (C++ Solution)
- Reverse a Stack (GeeksForGeeks) - Medium (C++ Solution)
- Reverse a String Using Stack - Easy (C++ Solution)
- Insert An Element At Its Bottom In A Given Stack (Coding Ninjas) - Easy (C++ Solution)
Day 84: View Code - 13 July, 2025
- Process String with Special Operations I (Leetcode, Medium) (Question) (C++ Solution)
- Process String with Special Operations II (Leetcode, Medium) (Question) (C++ Solution)
- Sort a Stack (GeeksforGeeks, Medium) (Question) (C++ Solution)
- Redundant Brackets (Coding Ninjas, Easy) (Question) (C++ Solution)
- Minimum Cost To Make String Valid (Coding Ninjas, Medium) (Question) (C++ Solution)
Day 85: View Code - 14 July, 2025
-
Next Smaller Element (Naukri Code360) - Medium (C++ Solution)
-
1290. Convert Binary Number in a Linked List to Integer (LeetCode) - Easy (C++ Solution)
-
32. Longest Valid Parentheses (LeetCode) - Hard (C++ Solution)
Day 86 View Code - 15 July, 2025
- Stack and Miscellaneous Problems
- 3136. Valid Word (LeetCode) - Easy (C++ Solution)
- 901. Online Stock Span (LeetCode) - Medium (C++ Solution)
- 84. Largest Rectangle in Histogram (LeetCode) - Hard (C++ Solution)
Day 87 View Code - 16 July, 2025
- Stack & Parity Problems
- The Celebrity Problem (GeeksforGeeks) - Medium (C++ Solution)
- 3201. Find the Maximum Length of Valid Subsequence I (LeetCode) - Medium (C++ Solution)
Day 88 View Code - 17 July, 2025
- Stack & 2D Array Problems
- 85. Maximal Rectangle (LeetCode) - Hard (C++ Solution)
- N Stacks In An Array (Coding Ninjas) - Hard (C++ Solution)
Day 89 View Code - 18 July, 2025
- 23. Merge k Sorted Lists (LeetCode) - Hard (C++ Solution)
Day 90 View Code - 19 July, 2025
- Stack Problems
- Design a Stack That Supports getMin in O(1) Time and O(1) Extra Space (Naukri Code360) - Medium (C++ Solution)
- 143. Reorder List (LeetCode) - Medium (C++ Solution)
Day 91 View Code - 20 July, 2025
- Queue Problems
- 3622. Check Divisibility by Digit Sum and Product (LeetCode) - Easy (C++ Solution)
- STL Queue Demo (C++ Solution)
- Custom Queue Using Array (C++ Solution)
- Custom Queue Using Linked List (C++ Solution)
Day 92 View Code - 21 July, 2025
- String & Queue Problems
- 1957. Delete Characters to Make Fancy String (LeetCode) - Easy (C++ Solution)
- 622. Design Circular Queue (LeetCode) - Medium (C++ Solution)
- Custom Circular Queue (C++ Solution)
Day 93 View Code - 22 July, 2025
- Custom Queue Implementations
- Doubly Ended Queue (Deque) - (C++ Solution)
- Input-Restricted Queue - (C++ Solution)
- Output-Restricted Queue - (C++ Solution)
- 641. Design Circular Deque (LeetCode) - Medium (C++ Solution)
Day 94 View Code - 23 July, 2025
- Linked List & Queue Problems
- 203. Remove Linked List Elements (LeetCode) - Easy (C++ Solution)
- Queue Reversal (GeeksForGeeks) - Easy (C++ Solution)
Day 95 View Code - 24 July, 2025
- Queue & String Problems
- 387. First Unique Character in a String (LeetCode) - Easy (C++ Solution)
- First Non-repeating Character in a Stream (GeeksForGeeks) - Medium (C++ Solution)
- Reverse First K Elements of Queue (GeeksForGeeks) - Medium (C++ Solution)
- First Negative Integer in Every Window of Size K (GeeksForGeeks) - Medium (C++ Solution)
Day 96 View Code - 25 July, 2025
- Queue & Stack Problems (See Details)
- 134. Gas Station (LeetCode) - Medium (C++ Solution)
- 225. Implement Stack using Queues (LeetCode) - Easy (C++ Solution)
- 232. Implement Queue using Stacks (LeetCode) - Easy (C++ Solution)
- Interleave the First Half of the Queue with Second Half (GeeksForGeeks) - Medium (C++ Solution)
Day 97 View Code - 26 July, 2025
- Advanced Problems (See Details)
- 24. Swap Nodes in Pairs (LeetCode) - Medium (C++ Solution)
- Sum of Max and Min of Window K in Array (GeeksforGeeks) - Medium (C++ Solution)
- N Queues in an Array (Naukri Code360) - Medium (C++ Solution)
Day 98 View Code - 27 July, 2025
- Binary Tree Fundamentals (See Details)
- Binary Tree Implementation - Comprehensive tree operations
- Count Leaves in Binary Tree (GeeksForGeeks) - Easy (C++ Solution)
- 222. Count Complete Tree Nodes (LeetCode) - Medium (C++ Solution)
- 3627. Maximum Median Sum of Subsequences of Size 3 (LeetCode) - Medium (C++ Solution)
Day 99 View Code - 28 July, 2025
- Advanced Binary Tree Problems and Tree Properties (See Details)
- Height of Binary Tree - Comprehensive tree height calculation
- 543. Diameter of Binary Tree (LeetCode) - Easy (C++ Solution)
- 110. Balanced Binary Tree (LeetCode) - Easy (C++ Solution)
- 100. Same Tree (LeetCode) - Easy (C++ Solution)
- Sum Tree (GeeksForGeeks) - Medium (C++ Solution)
Day 100 View Code - 29 July, 2025
- Binary Tree Traversal and Tree Properties (See Details)
- 101. Symmetric Tree (LeetCode) - Easy (C++ Solution)
- 102. Binary Tree Level Order Traversal (LeetCode) - Medium (C++ Solution)
- 103. Binary Tree Zigzag Level Order Traversal (LeetCode) - Medium (C++ Solution)
- 104. Maximum Depth of Binary Tree (LeetCode) - Easy (C++ Solution)
- 107. Binary Tree Level Order Traversal II (LeetCode) - Medium (C++ Solution)
- 94. Binary Tree Inorder Traversal (LeetCode) - Easy (C++ Solution)
Day 101 View Code - 30 July, 2025
- Advanced Binary Tree Traversal and Tree Properties (See Details)
- Boundary Traversal of Binary Tree (GeeksForGeeks) - Medium (C++ Solution)
- 199. Binary Tree Right Side View (LeetCode) - Medium (C++ Solution)
- 987. Vertical Order Traversal of Binary Tree (LeetCode) - Hard (C++ Solution)
Day 102 View Code - 31 July, 2025
- Advanced Tree Traversal Techniques (See Details)
- Top View of Binary Tree (GeeksForGeeks) - Medium (C++ Solution)
- Bottom View of Binary Tree (GeeksForGeeks) - Medium (C++ Solution)
- Diagonal Traversal of Binary Tree (GeeksForGeeks) - Medium (C++ Solution)
- 513. Find Bottom Left Tree Value (LeetCode) - Medium (C++ Solution)
Day 103 View Code - 1 August, 2025
- Binary Tree Path Sum Problems (See Details)
- 112. Path Sum (LeetCode) - Easy (C++ Solution)
- 437. Path Sum III (LeetCode) - Medium (C++ Solution)
- 1161. Maximum Level Sum of Binary Tree (LeetCode) - Medium (C++ Solution)
- Sum of Nodes on the Longest Path (GeeksForGeeks) - Medium (C++ Solution)
- 236. Lowest Common Ancestor of a Binary Tree (LeetCode) - Medium (C++ Solution)
Day 104 View Code - 2 August, 2025
- Binary Tree Advanced Problems (See Details)
- 1483. Kth Ancestor of a Tree Node (LeetCode) - Hard (C++ Solution)
- Maximum Sum of Non-adjacent Nodes (GeeksForGeeks) - Medium (C++ Solution)
Day 105 View Code - 3 August, 2025
- Array Patterns and Binary Tree Construction (See Details)
- 3637. Trionic Array I (LeetCode) - Easy(C++ Solution)
- 105. Construct Binary Tree from Preorder and Inorder Traversal (LeetCode) - Medium (C++ Solution)
- 106. Construct Binary Tree from Inorder and Postorder Traversal (LeetCode) - Medium (C++ Solution)
Day 106 View Code - 4 August, 2025
- Array Manipulation and Search Problems (See Details)
- 80. Remove Duplicates from Sorted Array II (LeetCode) - Medium (C++ Solution)
- 81. Search in Rotated Sorted Array II (LeetCode) - Medium (C++ Solution)
Day 107 View Code - 5 August, 2025
- Linked List Node Deletion (See Details)
- 237. Delete Node in a Linked List (LeetCode) - Medium (C++ Solution)
Day 108 View Code - 6 August, 2025
- Binary Tree Problems and Morris Traversal (See Details)
- 2385. Amount of Time for Binary Tree to Be Infected (LeetCode) - Medium (C++ Solution)
- Morris Traversal Implementation (GeeksForGeeks) - Advanced (C++ Solution)
- 114. Flatten Binary Tree to Linked List (LeetCode) - Medium (C++ Solution)
Day 109 View Code - 7 August, 2025
- Binary Search Tree Fundamentals and Operations (See Details)
- Binary Search Tree Implementation - Complete BST with basic operations (C++ Solution)
- 700. Search in a Binary Search Tree (LeetCode) - Easy (C++ Solution)
- 701. Insert into a Binary Search Tree (LeetCode) - Medium (C++ Solution)
- 1008. Construct Binary Search Tree from Preorder Traversal (LeetCode) - Medium (C++ Solution)
Day 110 View Code - 8 August, 2025
- Binary Search Tree Operations and Linked List to BST Conversion (See Details)
- Minimum Node in Binary Search Tree - Find min/max values in BST (C++ Solution)
- 109. Convert Sorted List to Binary Search Tree (LeetCode) - Medium (C++ Solution)
Day 111 View Code - 9 August, 2025
- Binary Search Tree Operations with Test Cases (See Details)
- Inorder Predecessor and Successor (GeeksforGeeks) - Medium (C++ Solution)
- 450. Delete Node in a BST (LeetCode) - Medium (C++ Solution)
- 98. Validate Binary Search Tree (LeetCode) - Medium (C++ Solution)
Day 112 View Code - 10 August, 2025
- Kth Element Problems in Binary Search Tree (See Details)
- Kth Largest Element in BST (GeeksForGeeks) - Medium (C++ Solution)
- 230. Kth Smallest Element in a BST (LeetCode) - Medium (C++ Solution)
Day 113 View Code - 11 August, 2025
- Binary Search Tree Problems with Morris Traversal (See Details)
- 938. Range Sum of BST (LeetCode) - Easy (C++ Solution)
- 235. Lowest Common Ancestor of a Binary Search Tree (LeetCode) - Easy (C++ Solution)
- 653. Two Sum IV - Input is a BST (LeetCode) - Easy (C++ Solution)
Day 114 View Code - 12 August, 2025
- Binary Search Tree Problems (See Details)
- 1382. Balance a Binary Search Tree (LeetCode) - Medium (C++ Solution)
- Flatten BST to Sorted List (GeeksForGeeks) - Medium (C++ Solution)
Day 115 View Code - 13 August, 2025
- Binary Search Tree Construction (See Details)
- 1008. Construct Binary Search Tree from Preorder Traversal (LeetCode) - Medium (C++ Solution)
Day 116 View Code - 14 August, 2025
- Binary Search Tree Problems (See Details)
- 99. Recover Binary Search Tree (LeetCode) - Medium (C++ Solution)
- 108. Convert Sorted Array to Binary Search Tree (LeetCode) - Easy (C++ Solution)
- 111. Minimum Depth of Binary Tree (LeetCode) - Easy (C++ Solution)
Day 117 View Code - 15 August, 2025
- Arrays: Cycle Detection Trick (See Details)
- 287. Find the Duplicate Number (LeetCode) - Medium (C++ Solution)
Day 118 View Code - 19 August, 2025
- Binary Search Tree Problems (See Details)
- Largest BST in a Binary Tree (GeeksforGeeks) - Medium (C++ Solution)
- Merge Two BSTs (GeeksforGeeks) - Medium (C++ Solution)
- 1373. Maximum Sum BST in Binary Tree (LeetCode) - Hard (C++ Solution)
Day 119 View Code - 20 August, 2025
- Heap Data Structure (See Details)
- Heap Implementation (C++ Solution)
Day 120 View Code - 21 August, 2025
- Heapify Algorithm (See Details)
- Heap Sort (See Details)
- Priority Queue (C++ Example)
Day 121 View Code - 22 August, 2025
- Kth Smallest Element in Array problem link (See Details)
- Leetcode 215. Kth Largest Element in an Array (C++ Solution)
Day 122 View Code - 23 August, 2025
- Binary Tree and Heap Problems (See Details)
- 958. Check Completeness of a Binary Tree (LeetCode) - Medium (C++ Solution)
- Is Binary Tree Heap (GeeksForGeeks) - Medium (C++ Solution)
- Merge Two Max Heaps (GeeksForGeeks) - Medium (C++ Solution)
- Minimum Cost of Ropes (GeeksForGeeks) - Medium (C++ Solution)
- BST to Max Heap (GeeksForGeeks) - Medium (C++ Solution)
- 617. Merge Two Binary Trees (LeetCode) - Easy (C++ Solution)
Day 123 View Code - 24 August, 2025
- 53. Maximum Subarray (LeetCode) - Medium (C++ Solution)
- K-th Largest Sum Contiguous Subarray (GeeksForGeeks) - Medium (C++ Solution)
- 23. Merge k Sorted Lists (LeetCode) - Hard (C++ Solution)
Day 124 View Code - 25 August, 2025
- 632. Smallest Range Covering Elements from K Lists (LeetCode) - Hard (C++ Solution)
- 295. Find Median from Data Stream (LeetCode) - Hard (C++ Solution)
Day 125 View Code - 26 August, 2025
- Hashmap Fundamentals (See Details)
- Hashmap Implementation - Basic operations and implementation details
- Hash Table Internals - Detailed explanation of hash table internal workings
- 3005. Count Elements With Maximum Frequency (LeetCode) - Easy (C++ Solution)
Day 126 View Code - 27 August, 2025
- Trie Data Structure (See Details)
- Trie Implementation - Complete implementation with insert, search, and delete operations
- 208. Implement Trie (Prefix Tree) (LeetCode) - Medium (C++ Solution)
Day 127 View Code - 28 August, 2025
- Trie Applications (See Details)
- 14. Longest Common Prefix (LeetCode) - Easy (C++ Solution)
Day 128 View Code - 30 August, 2025
- Trie and Prefix Operations (See Details)
- 1268. Search Suggestions System (LeetCode) - Medium (C++ Solution)
- 2185. Counting Words With a Given Prefix (LeetCode) - Easy (C++ Solution)
- 2255. Count Prefixes of a Given String (LeetCode) - Easy (C++ Solution)
Day 129 View Code - 31 August, 2025
- Backtracking Problems
- 51. N-Queens (LeetCode) - Hard (C++ Solution)
- Rat in a Maze Problem (GeeksForGeeks) - Medium (C++ Solution)
Day 130 View Code - 1 September, 2025
- Sudoku Problems
- 36. Valid Sudoku (LeetCode) - Medium (C++ Solution)
- 37. Sudoku Solver (LeetCode) - Hard (C++ Solution)
Day 131 View Code - 2 September, 2025
- Graph Implementation - Basic graph implementation using adjacency list
- Print Adjacency List (Coding Ninjas) - Easy (C++ Solution)
Day 132 View Code - 4 September, 2025
- Graph Traversal Algorithms
- BFS Traversal - Implementation of Breadth-First Search for both connected and disconnected graphs
- BFS of Graph (GeeksForGeeks) - Medium (C++ Solution)
- DFS of Graph (GeeksForGeeks) - Medium (C++ Solution)
Day 133 View Code - 5 September, 2025
- Graph Cycle Detection
- Detect Cycle in an Undirected Graph (GeeksForGeeks) - Medium (C++ Solution)
Day 134 View Code - 6 September, 2025
- Directed Graph Cycle Detection
- Detect Cycle in a Directed Graph (GeeksForGeeks) - Medium (C++ Solution)
- 2360. Longest Cycle in a Graph (LeetCode) - Hard (C++ Solution)
Day 135 View Code - 7 September, 2025
- Topological Sort
- Topological Sort (GeeksForGeeks) - Medium (C++ Solution)
- Cycle Detection in Directed Graph using Kahn's Algorithm (GeeksForGeeks) - Medium (C++ Solution)
Day 136 View Code - 8 September, 2025
- Shortest Path Algorithms
- Shortest Path in an Unweighted Undirected Graph (Naukri Code360) - Medium (C++ Solution)
Day 137 View Code - 9 September, 2025
- Path Finding in Directed Acyclic Graphs
- 797. All Paths From Source to Target (LeetCode) - Medium (C++ Solution)
Day 138 View Code - 10 September, 2025
- Shortest Paths in Weighted Directed Acyclic Graphs
- Shortest Path in Directed Acyclic Graph (GeeksforGeeks) - Medium (C++ Solution)
Day 139 View Code - 13 September, 2025
- Dijkstra's Algorithm for Shortest Path in Weighted Graphs
- 743. Network Delay Time (LeetCode) - Medium (C++ Solution)
Day 140 View Code - 14 September, 2025
- Minimum Spanning Tree (GeeksforGeeks) - Medium (C++ Solution)
Day 141 View Code - 15 September, 2025
- Minimum Spanning Tree (Kruskal's Algorithm) (GeeksforGeeks) - Medium (C++ Solution)
Day 142 View Code - 16 September, 2025
- 1584. Min Cost to Connect All Points (LeetCode) - Medium (C++ Solution)
- 1192. Critical Connections in a Network (LeetCode) - Hard (C++ Solution)
Feel free to explore my solutions and learning journey! 💻


