Welcome to AlgorithmAdventures! This is my personal coding journal where I solve algorithmic challenges on LeetCode and sharpen my problem-solving skills daily.
Join me as I explore different algorithms and techniques to crack challenging problems! ๐ปโจ
๐ฅ Dynamic Programming ร14
โ๏ธ Divide and Conquer ร6
๐ฏ Quickselect ร3
๐ Monotonic Stack ร8
๐งฉ Union Find ร7
๐ Monotonic Queue ร3
๐ Topological Sort ร3
๐ Shortest Path ร3
๐๏ธ Hash Table ร56
โ Math ร30
๐ Binary Search ร27
๐ Breadth-First Search (BFS) ร19
๐ฏ Sliding Window ร16
๐ก Bit Manipulation ร15
โก Greedy ร14
๐ฒ Depth-First Search (DFS) ร14
๐งฉ Array ร140
๐ String ร70
๐โโ๏ธ๐โโ๏ธ Two Pointers ร37
๐ Sorting ร28
๐งฎ Matrix ร21
๐ Linked List ร18
๐ฅ Stack ร17
๐ฎ Simulation ร15
Every day, I pick a new problem from LeetCode, solve it, and commit the solution here.
This is part of my commitment to improving my algorithmic thinking and coding proficiency, while also maintaining a streak of consistent progress.
- Each folder is named after the problem solved for that day.
- Inside each folder, you'll find:
- ๐ Code Solution
- ๐ก Problem Explanation (in some cases)
- โ Test Cases
Feel free to explore the repository and see how I approach various problems.
Let's learn together and continue to grow as problem-solvers! ๐
- 1652. Defuse the Bomb โ ๐ O(n*k)
- 1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence โ ๐ O(N)
- 3151. Special Array I โ ๐ O(N)
- 2558. Take Gifts From the Richest Pile โ ๐ O(N)
- 1752. Check if Array Is Sorted and Rotated โ ๐ O(N)
- 3105. Longest Strictly Increasing or Strictly Decreasing Subarray โ ๐ O(N)
- 1800. Maximum Ascending Subarray Sum โ ๐ O(N)
- 1790. Check if One String Swap Can Make Strings Equal โ ๐ O(N)
- 3174. Clear Digits โ ๐ O(N)
- 2460. Apply Operations to an Array โ ๐ O(N)
- 2570. Merge Two 2D Arrays by Summing Values โ ๐ O(N)
- 2379. Minimum Recolors to Get K Consecutive Black Blocks โ ๐ O(N)
- 2914. Minimum Number of Changes to Make Binary String Beautiful โ ๐ O(n)
- 3011. Find if Array Can Be Sorted โ ๐ O(nยฒ)
- 2275. Largest Combination With Bitwise AND Greater Than Zero โ ๐ O(n)
- 1829. Maximum XOR for Each Query โ ๐ O(n)
- 3133. Minimum Array End โ ๐ O(n * 2^b)
- 3097. Shortest Subarray With OR at Least K II โ ๐ O(n)
- 2601. Prime Subtraction Operation โ ๐ O(n * m * sqrt(m))
- 2563. Count the Number of Fair Pairs โ Brute force & Optimized
- 2257. Count Unguarded Cells in the Grid โ ๐ O(k * (m+n))
- 2516. Take K of Each Character From Left and Right โ ๐ O(n)
- 1861. Rotating the Box โ ๐ O(n*m)
- 438. Find All Anagrams in a String โ ๐ O(N)
- 54. Spiral Matrix โ ๐ O(N*M)
- 2109. Adding Spaces to a String โ ๐ O(N)
- 2981. Find Longest Special Substring That Occurs Thrice I โ ๐ O(Nยฒ)
- 2779. Maximum Beauty of an Array After Applying Operation โ ๐ O(N log N)
- 1726. Tuple with Same Product โ ๐ O(Nยฒ)
- 3160. Find the Number of Distinct Colors Among the Balls โ ๐ O(N)
- 2349. Design a Number Container System โ ๐ O(1)
- 2364. Count Number of Bad Pairs โ ๐ O(N)
- 1910. Remove All Occurrences of a Substring โ ๐ O(N)
- 2342. Max Sum of a Pair With Equal Sum of Digits โ Brute Force Approach
- 2342. Max Sum of a Pair With Equal Sum of Digits โ ๐ O(N)
- 3066. Minimum Operations to Exceed Threshold Value II โ ๐ O(N Log(N))
- 1352. Product of the Last K Numbers โ ๐ O(1)
- 2698. Find the Punishment Number of an Integer โ ๐ O(N(log(N)))
- 1415. The k-th Lexicographical String of All Happy Strings of Length n โ ๐O(n*2^n)
- 1980. Find Unique Binary String โ ๐ O(2^n)
- 3208. Alternating Groups II โ ๐ O(N)
- 2206. Divide Array Into Equal Pairs โ ๐ O(N)
- โ TCS CodeVita PYQ: Rotate String and Anagram
- โ TCS CodeVita PYQ: SamBrideHunt
- โ TCS Chakravyuha Matrix Traversal