GFG-Solution
CtrlK
  • README
  • Contributor Covenant Code of Conduct
  • Contributing to GeeksforGeeks-POTD
  • SECURITY
  • .github
    • PULL_REQUEST_TEMPLATE
    • ISSUE_TEMPLATE
      • custom
  • 160 Days Of Problem Solving
    • ✨160 Days of Problem Solving πŸ”₯
      • Day 1 - Second Largest
      • πŸš€Day 10. Kadane's Algorithm 🧠
      • πŸš€Day 11. Maximum Product Subarray 🧠
      • πŸš€Day 12. Max Circular Subarray Sum 🧠
      • πŸš€Day 13. Smallest Positive Missing Number 🧠
      • Day 2 - Move All Zeroes to End
      • Day 3 - Reverse an Array
      • Day 4 - Rotate Array
      • Day 5 - Next Permutation
      • Day 6 - Majority Element II
      • Day 7 - Stock Buy and Sell – Multiple Transaction Allowed
      • Day 8 - Stock Buy and Sell – Max one Transaction Allowed
      • πŸš€Day 9. Minimize the Heights II 🧠
      • πŸŽ‰BONUS PROBLEMS 🎁
        • πŸš€1. Split array in three equal sum subarrays 🧠
        • πŸš€2. Repetitive Addition of Digits 🧠
        • πŸš€3. Maximize Number of 1's 🧠
        • πŸš€4. Last Moment Before All Ants Fall Out of a Plank 🐜
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Find Only Repetitive Element from 1 to n-1 🧠
      • πŸš€Day 2. Missing in Array 🧠
      • πŸš€Day 3. Unique Number I 🧠
      • πŸš€Day 4. Unique Number II 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Longest Increasing Subsequence 🧠
      • πŸš€Day 10. 0 - 1 Knapsack Problem 🧠
      • πŸš€Day 11. Coin Change (Count Ways) 🧠
      • πŸš€Day 12. Coin Change (Minimum Coins) 🧠
      • πŸš€Day 13. Minimum Jumps 🧠
      • πŸš€Day 14. Subset Sum Problem 🧠
      • πŸš€Day 15. Partition Equal Subset Sum 🧠
      • πŸš€Day 16. Stock Buy and Sell – Max K Transactions Allowed 🧠
      • πŸš€Day 17. Stock Buy and Sell – Max 2 Transactions Allowed 🧠
      • πŸš€Day 18. Stickler Thief 🧠
      • πŸš€Day 19. Stickler Thief II 🧠
      • πŸš€Day 2. Longest String Chain 🧠
      • πŸš€Day 20. Total Decoding Messages 🧠
      • πŸš€Day 21. Matrix Chain Multiplication 🧠
      • πŸš€Day 22. Boolean Parenthesization 🧠
      • πŸš€Day 23. Word Break 🧠
      • πŸš€Day 3. Longest Common Subsequence 🧠
      • πŸš€Day 4. Longest Palindromic Subsequence 🧠
      • πŸš€Day 5. Longest Palindrome in a String 🧠
      • πŸš€Day 6. Palindrome SubStrings 🧠
      • πŸš€Day 7. Edit Distance 🧠
      • πŸš€Day 8. Ways to Reach the n'th Stair 🧠
      • πŸš€Day 9. Min Cost Climbing Stairs 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. DFS of Graph 🧠
      • πŸš€Day 10. Minimum cost to connect all houses in a city 🧠
      • πŸš€Day 11. Dijkstra’s Algorithm 🧠
      • πŸš€Day 12. Flood fill Algorithm 🧠
      • πŸš€Day 13. Account Merge 🧠
      • πŸš€Day 14. Clone an Undirected Graph 🧠
      • πŸš€Day 15. Alien Dictionary 🧠
      • πŸš€Day 16. Bellman-Ford 🧠
      • πŸš€Day 17. Floyd Warshall 🧠
      • πŸš€Day 18. Minimum Weight Cycle 🧠
      • πŸš€Day 2. BFS of Graph 🧠
      • πŸš€Day 3. Rotten Oranges 🧠
      • πŸš€Day 4. Undirected Graph Cycle 🧠
      • πŸš€Day 5. Find the Number of Islands 🧠
      • πŸš€Day 6. Topological sort 🧠
      • πŸš€Day 7. Directed Graph Cycle 🧠
      • πŸš€Day 8. Bridge edge in a graph 🧠
      • πŸš€Day 9. Articulation Point - II 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Minimum Platforms 🧠
      • πŸš€Day 2. Activity Selection 🧠
      • πŸš€Day 3. Job Sequencing Problem 🧠
      • πŸš€Day 4. Gas Station 🧠
      • πŸš€Day 5. Maximize partitions in a String 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Two Sum - Pair with Given Sum 🧠
      • πŸš€Day 2. Count Pair with Given Sum 🧠
      • πŸš€Day 3. Find All Triplets with Zero Sum 🧠
      • πŸš€Day 4. Intersection of Two arrays with Duplicate Elements 🧠
      • πŸš€Day 5. Union of Arrays with Duplicates 🧠
      • πŸš€Day 6. Longest Consecutive Subsequence 🧠
      • πŸš€Day 7. Print Anagrams Together 🧠
      • πŸš€Day 8. Subarrays with Sum K 🧠
      • πŸš€Day 9. Count Subarrays with Given XOR 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. K Largest Elements 🧠
      • πŸš€Day 2. K Closest Points to Origin 🧠
      • πŸš€Day 3. Merge K sorted linked lists 🧠
      • πŸš€Day 4. Find median in a stream 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Reverse a linked list 🧠
      • πŸš€Day 10. LRU Cache 🧠
      • πŸš€Day 2. Rotate a linked list 🧠
      • πŸš€Day 3. Merge Two Sorted Linked Lists 🧠
      • πŸš€Day 4. Linked List Group Reverse 🧠
      • πŸš€Day 5. Add Number Linked Lists 🧠
      • πŸš€Day 6. Clone List with Next and Random 🧠
      • πŸš€Day 7. Detect Loop in linked list 🧠
      • πŸš€Day 8. Find the First Node of Loop in Linked List 🧠
      • πŸš€Day 9. Remove loop in Linked List 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Spirally Traversing a Matrix 🧠
      • πŸš€Day 2. Rotate by 90 degree 🧠
      • πŸš€Day 3. Search in a Row-Column Sorted Matrix 🧠
      • πŸš€Day 4. Search in a Row-Wise Sorted Matrix 🧠
      • πŸš€Day 5. Search in a sorted Matrix 🧠
      • πŸš€Day 6. Set Matrix Zeroes 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Equilibrium Point 🧠
      • πŸš€Day 1. Longest Subarray with Sum K 🧠
      • πŸš€Day 3. Largest Subarray of 0s and 1s 🧠
      • πŸš€Day 4. Product array puzzle 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. K Sized Subarray Maximum 🧠
      • πŸš€Day 2. Longest Bounded-Difference Subarray 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Permutations of a String 🧠
      • πŸš€Day 2. Implement Pow 🧠
      • πŸš€Day 3. N-Queen Problem 🧠
      • πŸš€Day 4. Solve the Sudoku 🧠
      • πŸš€Day 5. Word Search 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Number of Occurrences 🧠
      • πŸš€Day 2. Sorted and Rotated Minimum 🧠
      • πŸš€Day 3. Search in Rotated Sorted Array 🧠
      • πŸš€Day 4. Peak element 🧠
      • πŸš€Day 5. K-th element of two Arrays 🧠
      • πŸš€Day 6. Aggressive Cows 🧠
      • πŸš€Day 7. Allocate Minimum Pages 🧠
      • πŸš€Day 8. Kth Missing Positive Number in a Sorted Array 🧠
      • πŸŽ‰BONUS PROBLEMS 🎁
        • πŸš€1. Implement Lower Bound 🧠
        • πŸš€2. Bitonic Point 🧠
        • πŸš€3. Median of 2 Sorted Arrays of Different Sizes 🧠
        • πŸš€4. Square Root 🧠
        • πŸš€5. Koko Eating Bananas 🧠
        • πŸš€6. Minimum days to make M bouquets 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Sort 0s, 1s, and 2s 🧠
      • πŸš€Day 2. Find H-Index 🧠
      • πŸš€Day 3. Count Inversions 🧠
      • πŸš€Day 4. Overlapping Intervals 🧠
      • πŸš€Day 5. Insert Intervals 🧠
      • πŸš€Day 6. Non-overlapping Intervals 🧠
      • πŸš€Day 7. Merge Without Extra Space 🧠
      • πŸŽ‰BONUS PROBLEMS 🎁
        • πŸš€1. Minimum sum 🧠
        • πŸš€2. Meeting Rooms 🧠
        • πŸš€3. Form the Largest Number 🧠
        • πŸš€4. Make array elements unique 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Parenthesis Checker 🧠
      • πŸš€Day 2. Longest valid Parentheses 🧠
      • πŸš€Day 3. Next Greater Element 🧠
      • πŸš€Day 4. Stock span problem 🧠
      • πŸš€Day 5. Histogram Max Rectangular Area 🧠
      • πŸš€Day 6. Maximum of minimum for every window size 🧠
      • πŸš€Day 7. Get Min from Stack 🧠
      • πŸš€Day 8. Evaluation of Postfix Expression 🧠
      • πŸš€Day 9. Decode the string 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Implement Atoi 🧠
      • πŸš€Day 2. Add Binary Strings 🧠
      • πŸš€Day 3. Anagram 🧠
      • πŸš€Day 4. Non-Repeating Character 🧠
      • πŸš€Day 5. Search Pattern (KMP Algorithm) 🧠
      • πŸš€Day 6. Min Chars to Add for Palindrome 🧠
      • πŸš€Day 7. Strings Rotations of Each Other 🧠
      • πŸŽ‰BONUS PROBLEMS 🎁
        • πŸš€1. Fizz Buzz 🧠
        • πŸš€2. CamelCase Pattern Matching 🧠
        • πŸš€3. Palindrome Sentence 🧠
        • πŸš€4. Minimum Repeats to Make Substring 🧠
        • πŸš€5. Longest Prefix Suffix 🧠
        • πŸš€6. Integer to Words 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Level order traversal 🧠
      • πŸš€Day 10. Check for BST 🧠
      • πŸš€Day 11. k-th Smallest in BST 🧠
      • πŸš€Day 12. Pair Sum in BST 🧠
      • πŸš€Day 13. Fixing Two nodes of a BST 🧠
      • πŸš€Day 14. Lowest Common Ancestor in a BST 🧠
      • πŸš€Day 15. Serialize and deserialize a binary tree 🧠
      • πŸš€Day 2. Height of Binary Tree 🧠
      • πŸš€Day 3. Diameter of a Binary Tree 🧠
      • πŸš€Day 4. Mirror Tree 🧠
      • πŸš€Day 5. Construct Tree from Inorder & Preorder 🧠
      • πŸš€Day 6. Inorder Traversal 🧠
      • πŸš€Day 7. Tree Boundary Traversal 🧠
      • πŸš€Day 8. Maximum path sum from any node 🧠
      • πŸš€Day 9. K Sum Paths 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Implement Trie 🧠
      • πŸš€Day 2. Maximum XOR of two numbers in an array 🧠
    • ✨160 Days of Problem Solving πŸ”₯
      • πŸš€Day 1. Count all triplets with given sum in sorted array 🧠
      • πŸš€Day 10. Container With Most Water 🧠
      • πŸš€Day 2. Count Pairs whose sum is less than target 🧠
      • πŸš€Day 3. Sum Pair Closest to Target 🧠
      • πŸš€Day 4. Pair with Given Sum in a Sorted Array 🧠
      • πŸš€Day 5. Count the number of possible triangles 🧠
      • πŸš€Day 6. Indexes of Subarray Sum 🧠
      • πŸš€Day 7. Count Distinct Elements in Every Window 🧠
      • πŸš€Day 8. Longest substring with distinct characters 🧠
      • πŸš€Day 9. Trapping Rain Water 🧠
  • April 2024 GFG SOLUTION
    • 01(April) Pairs violating the BST property
    • 02(April) Minimum Absolute Difference In BST
    • 03(April) Kth common ancestor in BST
    • 04(April) Sum of all substrings of a number
    • 05(April) Strictly Increasing Array
    • 06(April) Count Ways to N'th Stair
    • 07(April) Maximize dot product
    • 08(April) Optimal Strategy For A Game
    • 09(April) Minimum Points To Reach Destination
    • 10(April) Party of Couples
    • 11(April) Gray to Binary equivalent
    • 12(April) Sum of Products
    • 13(April) Reverse Bits
    • 14(April) Xoring and Clearing
    • 15(April) Count the elements
    • 16(April) Minimize the Difference
    • 17(April) Count Pairs in an Array
    • 18(April) Two Repeated Elements
    • 19(April) Find missing in second array
    • 20(April) Union of Two Sorted Arrays
    • 21(April) Three way partitioning
    • 22(April) Row with minimum number of 1's
    • 23(April) Rohan's Love for Matrix
    • 24(April) Paths to reach origin
    • 25(April) Maximum Sum of Hourglass
    • 26(April) Exit Point in a Matrix
    • 27(April) Merge Sort on Doubly Linked List
    • 28(April) Delete Middle of Linked List
    • 29(April) Remove every kth node
    • 30(April) Add two numbers represented by linked lists
  • April 2025 GFG SOLUTION
    • 1. DFS of Graph
    • 2. BFS of Graph
    • 3. Rotten Oranges
    • 4. Undirected Graph Cycle
    • 5. Find the Number of Islands
    • 6. Topological Sort
    • 7. Directed Graph Cycle
    • 8. Bridge Edge in a Graph
    • 9. Articulation Point - II
    • 10. Minimum cost to connect all houses in a city
    • 11. Dijkstra’s Algorithm
    • 12. Flood Fill Algorithm
    • 13. Clone an Undirected Graph
    • 14. Alien Dictionary
    • 15. Bellman-Ford
    • 16. Floyd Warshall
    • 17. Minimum Weight Cycle
    • 18. Implement Trie
    • 19. Maximum XOR of two numbers in an array
    • 20. Find Only Repetitive Element from 1 to n-1
    • 21. Missing in Array
    • 22. Unique Number I
    • 23. Unique Number II
    • 24. Unique Number III
    • 25. Majority Element
    • 26. Is Binary Tree Heap
    • 27. Multiply Two Strings
    • 28. Maximum Sum of Non-Adjacent Nodes
    • 29. Sort a Linked List of 0s, 1s, and 2s
    • 30. Find Length of Loop
  • August 2024 GFG SOLUTION
    • 01(Aug) Spirally traversing a matrix
    • 02(Aug) Edit Distance
    • 03(Aug) The Celebrity Problem
    • 04(Aug) N meetings in one room
    • 05(Aug) Bottom View of Binary Tree
    • 06(Aug) Validate an IP Address
    • 07(Aug) K-th element of two Arrays
    • 08(Aug) Sum Tree
    • 09(Aug) Maximize Array Value After Rearrangement
    • 10(Aug) Rotate a Linked List
    • 11(Aug) Job Sequencing Problem
    • 12(Aug) Median of two sorted arrays
    • 13. Square Root of a Number
    • 14. Longest Common Substring
    • 15. Add 1 to a Linked List Number
    • 16. Maximize The Cut Segments
    • 17. Product Array Puzzle
    • 18. Split an Array into Two Equal Sum Subarrays
    • 19. Kth Smallest Element
    • 20. Burning Tree
    • 21. Shortest Path in Undirected Graph
    • 22. Alien Dictionary
    • 23. Left View of Binary Tree
    • 24. 0-1 Knapsack Problem
    • 25. Number of Pairs
    • 26. Wildcard Pattern Matching
    • 27. Maximum Difference
    • 28. Sorting Elements of an Array by Frequency
    • 29. Find Length of Loop
    • 30. N-Queen Problem
    • 31. Sorted Subsequence of Size 3
  • December 2024 GFG SOLUTION
    • 01. Non-Repeating Character
    • 02. Search Pattern (KMP Algorithm)
    • 3. Min Chars to Add for Palindrome
    • 4. Strings Rotations of Each Other
    • 5. Sort 0s, 1s, and 2s
    • 6. Find H-Index
    • 7. Count Inversions
    • 8. Overlapping Intervals
    • 9. Insert Interval
    • 10. Non-overlapping Intervals
    • 11. Merge Without Extra Space
    • 12. Number of Occurrences
    • 13. Sorted and Rotated Minimum
    • 14. Search in Rotated Sorted Array
    • 15. Peak Element
    • 16. K-th Element of Two Arrays
    • 17. Aggressive Cows
    • 18. Allocate Minimum Pages
    • 19. Kth Missing Positive Number in a Sorted Array
    • 20. Spirally Traversing a Matrix
    • 21. Rotate by 90 degree
    • 22. Search in a Row-Column Sorted Matrix
    • 23. Search in a Row-Wise Sorted Matrix
    • 24. Search in a Sorted Matrix
    • 25. Set Matrix Zeroes
    • 26. Two Sum - Pair with Given Sum
    • 27. Count Pairs with Given Sum
    • 28. Find All Triplets with Zero Sum
    • 29. Intersection of Two Arrays with Duplicate Elements
    • 30. Union of Two Arrays with Duplicates
    • 31. Longest Consecutive Subsequence
  • February 2025 GFG SOLUTION
    • 1. Word Search
    • 2. Level Order Traversal
    • 3. Height of Binary Tree
    • 4. Diameter of a Binary Tree
    • 5. Mirror Tree
    • 6. Construct Tree from Inorder & Preorder
    • 7. Inorder Traversal
    • 8. Tree Boundary Traversal
    • 9. Maximum Path Sum from Any Node
    • 10. K Sum Paths
    • 11. Check for BST
    • 12. k-th Smallest in BST
    • 13. Pair Sum in BST
    • 14. Fixing Two nodes of a BST
    • 15. Lowest Common Ancestor in a BST
    • 16. Serialize and Deserialize a Binary Tree
    • 17. K Largest Elements
    • 18. K Closest Points to Origin
    • 19. Merge K Sorted Linked Lists
    • 20. Find Median in a Stream
    • 21. Parenthesis Checker
    • 22. Longest Valid Parentheses
    • 23. Next Greater Element
    • 24. Stock Span Problem
    • 25. Histogram Max Rectangular Area
    • 26. Maximum of Minimum for Every Window Size
    • 27. Get Min from Stack
    • 28. Evaluation of Postfix Expression
  • January 2025 GFG SOLUTION
    • 1. Print Anagrams Together
    • 02. Subarrays with Sum K
    • 03. Count Subarrays with Given XOR
    • 04. Count All Triplets with Given Sum in Sorted Array
    • 05. Count Pairs Whose Sum is Less Than Target
    • 06. Sum Pair Closest to Target
    • 07. Pair with Given Sum in a Sorted Array
    • 08. Count the number of possible triangles
    • 9. Indexes of Subarray Sum
    • 10. Count Distinct Elements in Every Window
    • 11. Longest Substring with Distinct Characters
    • 12. Trapping Rain Water
    • 13. Container With Most Water
    • 14. Equilibrium Point
    • 15. Longest Subarray with Sum K
    • 16. Largest Subarray of 0s and 1s
    • 17. Product Array Puzzle
    • 18. Reverse a linked list
    • 19. Rotate a Linked List
    • 20. Merge Two Sorted Linked Lists
    • 21. Linked List Group Reverse
    • 22. Add Number Linked Lists
    • 23. Clone List with Next and Random
    • 24. Detect Loop in Linked List
    • 25. Find the First Node of Loop in Linked List
    • 26. Remove Loop in Linked List
    • 27. LRU Cache
    • 28. Permutations of a String
    • 29. Implement Pow
    • 30. N-Queen Problem
    • 31. Solve the Sudoku
  • July 2024 GFG SOLUTION
    • 01(July) Make Binary Tree From Linked List
    • 02(July) linked list of strings forms a palindrome
    • 03(July) Remove all occurences of duplicates in a linked list
    • 04(July) Duplicate Subtrees
    • 05(July) Vertical Width of a Binary Tree
    • 06(July) Populate Inorder Successor for all nodes
    • 07(July) Ancestors in Binary Tree
    • 08(July) Search in Rotated Sorted Array
    • 09(July) Closest Three Sum
    • 10(July) Largest square formed in a matrix
    • 11(July) Maximum Connected group
    • 12(July) Root to leaf path sum
    • 13(July) Shortest Path in Weighted undirected graph
    • 14(July) Segregate 0s and 1s
    • 15(July) Smallest number
    • 16(July) Remaining String
    • 17(July) Construct Binary Tree from Parent Array
    • 18(July) Longest alternating subsequence
    • 19(July) Count Smaller elements
    • 20(July) Remove Half Nodes
    • 21(July) Maximum product subset of an array
    • 22(July) Largest BST
    • 22(July) Merge two BST 's
    • 24(July) Check for BST
    • 25(July) Array to BST
    • 26(July) K-Pangrams
    • 27(July) Form a palindrome
    • 28(July) Remove Duplicates
    • 29(July) Row with max 1s
    • 30(July) Rat in a Maze Problem - I
    • 31(July) Longest Common Prefix of Strings
  • July 2025 GFG SOLUTION
    • 01. Substrings of Length K with K-1 Distinct Elements
    • 02. Longest Subarray with At Most Two Distinct Integers
    • 03. Longest Substring with K Uniques
    • 04. Subarrays With At Most K Distinct Integers
    • 05. Max Score from Subarray Mins
    • 06. Maximum Sum Combination
    • 07. Next Greater Element in Circular Array
    • 08. Next Element with Greater Frequency
    • 09. Sum of Subarray Minimums
    • 10. Find the Longest String
    • 11. Trail of Ones
    • 12. Gold Mine Problem
    • 13. Maximum Sum of Elements Not Part of LIS
    • 14. Cutting Binary String
    • 15. Divisible by 13
    • 16. Nine Divisors
    • 17. Power of k in factorial of n
    • 18. LCM Triplet
    • 19. Count Unique Vowel Strings
    • 20. Count Numbers Containing Specific Digits
    • 21. Count the Coprimes
  • June 2024 GFG SOLUTION
    • 01(June) Odd Even Problem
    • 02(June) Construct list using given q XOR queries
    • 03(June) Trail of ones
    • 04(June) Binary representation of next number
    • 05(June) Swapping pairs make sum equal
    • 06(June) Max sum in the configuration
    • 07(June) Maximum occured integer
    • 08(June) Index of an Extra Element
    • 09(June) Convert array into Zig-Zag fashion
    • 10(June) Nuts and Bolts Problem
    • 11(June) Maximum Tip Calculator
    • 12(June) Count numbers containing 4
    • 13(June) Padovan Sequence
    • 14(June) Armstrong Numbers
    • 15(June) Mobile numeric keypad
    • 16(June) Prime Pair with Target Sum
    • 17(June) Check If two Line segments Intersect
    • 18(June) Number of Rectangles in a Circle
    • 19(June) Find maximum volume of a cuboid
    • 20(June) Integral Points Inside Triangle
    • 21(June) Compare two fractions
    • 22(June) Extract the Number from the String
    • 23(June) Print Bracket Number
    • 24(June) Summed Matrix
    • 25(June) Left Rotate Matrix K times
    • 26(June) Coverage of all Zeros in a Binary Matrix
    • 27(June) Toeplitz matrix
    • 28(June) The Palindrome Pattern
    • 29(June) Identical Linked Lists
    • 30(June) Delete node in Doubly Linked List
  • June 2025 GFG SOLUTION
    • 01. Count pairs Sum in matrices
    • 02. Unique Paths in a Grid
    • 03. Substrings with K Distinct
    • 04. LCS of three Strings
    • 05. Count the paths
    • 06. Search Pattern (Rabin-Karp Algorithm)
    • 07. Longest Span in two Binary Arrays
    • 08. Sum-String
    • 09. BST with Dead End
    • 10. Exactly One Swap
    • 11. Remove the Balls
    • 12. K Closest Elements
    • 13. Koko Eating Bananas
    • 14. Symmetric Tree
    • 15. Smallest Divisor
    • 16. Equalize the Towers
    • 17. Coin Piles
    • 18. All Palindromic Partitions
    • 19. Case-specific Sorting of Strings
    • 20. Group Balls by Sequence
    • 21. Police and Thieves
    • 22. Largest Divisible Subset
    • 23. Minimum Sum
    • 24. Lexicographically Largest String After K Deletions
    • 25. Check if Frequencies Can Be Equal
    • 26. Game with String
    • 27. Mobile Numeric Keypad
    • 28. Counting Elements in Two Arrays
    • 29. Split Array Largest Sum
    • 30. Max Min Height
  • March 2024 GFG SOLUTION
    • 01(March) Peak element
    • 02(March) First element to occur k times
    • 03(March) Largest Number formed from an Array
    • 04(March) Swap the array elements
    • 05(March) Maximum Index
    • 06(March) Search Pattern (Rabin-Karp Algorithm)
    • 07(March) Longest repeating and non-overlapping substring
    • 08(March) Check if frequencies can be equal
    • 09(March) Find the N-th character
    • 10(March) Remove all duplicates from a given string
    • 11(March) Count pairs Sum in matrices
    • 12(March) Generalised Fibonacci numbers
    • 13(March) Print matrix in diagonal pattern
    • 14(March) Largest subsquare surrounded by X
    • 15(March) Linked List that is Sorted Alternatingly
    • 16(March) Delete Node without Head Pointer
    • 17(March) Count Pairs whose sum is equal to X
    • 18(March) Level order traversal
    • 19(March) Possible Paths in a Tree
    • 20(March) Sum of nodes on the longest path from root to leaf node
    • 21(March) ZigZag Tree Traversal
    • 22(March) Diagonal sum in binary tree
    • 23(March) Fibonacci series up to Nth term
    • 24(March) Insert an Element at the Bottom of a Stack
    • 25(March) Print N-bit binary numbers having more 1s than 0s
    • 26(March) Additive sequence
    • 27(March) Find shortest safe route in a matrix
    • 28(March) City With the Smallest Number of Neighbors at a Threshold Distance
    • 29(March) Euler Circuit in an Undirected Graph
    • 30(March) Minimum element in BST
    • 31(March) Closest Neighbour in BST
  • March 2025 GFG SOLUTION
    • 1. Decode the String
    • 2. K Sized Subarray Maximum
    • 3. Longest Bounded-Difference Subarray
    • 4. Longest Increasing Subsequence
    • 5. Longest String Chain
    • 6. Longest Common Subsequence
    • 7. Longest Palindromic Subsequence
    • 8. Longest Palindrome in a String
    • 9. Palindrome SubStrings
    • 10. Edit Distance
    • 11. Ways to Reach the n'th Stair
    • 12. Min Cost Climbing Stairs
    • 13. 0-1 Knapsack Problem
    • 14. Coin Change (Count Ways)
    • 15. Coin Change (Minimum Coins)
    • 16. Minimum Jumps
    • 17. Subset Sum Problem
    • 18. Partition Equal Subset Sum
    • 19. Stock Buy and Sell – Max K Transactions Allowed
    • 20. Stock Buy and Sell – Max 2 Transactions Allowed
    • 21. Stickler Thief
    • 22. Stickler Thief II
    • 23. Total Decoding Messages
    • 24. Matrix Chain Multiplication
    • 25. Boolean Parenthesization
    • 26. Word Break
    • 27. Minimum Platforms
    • 28. Activity Selection
    • *29. Job Sequencing Problem**
    • 30. Gas Station
    • 31. Maximize Partitions in a String
  • May 2024 GFG SOLUTION
    • 01(May) Arrange Consonants and Vowels
    • 02(May) Serialize and deserialize a binary tree
    • 03(May) K distance from root
    • 04(May) Construct Binary Tree from Inorder and Postorder
    • 05(May) Vertical sum
    • 06(May) Print all nodes that don't have sibling
    • 07(May) Reverse Level Order Traversal
    • 08(May) Root to Leaf Paths
    • 09(May) Divisor Game
    • 10(May) Combination Sum II
    • 11(May) Juggler Sequence
    • 12(May) Minimum steps to destination
    • 13(May) Number of Good Components
    • 14(May) Path With Minimum Effort
    • 15(May) Account Merge
    • 16(May) Divisibility tree
    • 17(May) Find Pair Given Difference
    • 18(May) Find the Highest number
    • 19(May) Find the closest number
    • 20(May) Modular Exponentiation for large numbers
    • 21(May) K closest elements
    • 22(May) Minimize Max Distance to Gas Station
    • 23(May) K-Palindrome
    • 24(May) Partitions with Given Difference
    • 25(May) You and your books
    • 26(May) Minimum Cost To Make Two Strings Identical
    • 27(May) Longest subsequence-1
    • 28(May) Minimum cost to fill given weight in a bag
    • 29(May) Geek and its Game of Coins
    • 30(May) String Subsequence
    • 31(May) Swap two nibbles in a byte
  • May 2025 GFG SOLUTION
    • 1. Pascal Triangle
    • 2. Bitonic Point
    • 3. Prime List
    • 4. Smallest Distinct Window
    • 5. Search in an Almost Sorted Array
    • 6. Left View of Binary Tree
    • 7. Root to Leaf Paths
    • 8. Missing Element of Arithmetic Progression
    • 9. Largest Number in K Swaps
    • 10. Longest Subarray With Majority Greater Than K
    • 11. K-th Largest Sum Contiguous Subarray
    • 12. Meeting Rooms III
    • 13. nCr
    • 14. Look and Say Pattern
    • 15. Substrings with Same First and Last Characters
    • 16. Smallest Range in K Lists
    • 17. Sort the given array after applying the given equation
    • 18. Level Order in spiral form
    • 19. Predecessor and Successor
    • 20. Burning Tree
    • 21. Kth Smallest Number in Multiplication Table
    • 22. Minimum Deletions
    • 23. Dice throw
    • 24. Sum of All Substrings of a Number
    • 25. Pythagorean Triplet
    • 26. Insert in Sorted Circular Linked List
    • 27. Print Leaf Nodes from Preorder Traversal of BST
    • 28. Find Rectangle with Corners as 1
    • 29. Sum of nodes on the longest path
    • 30. Closest Neighbour in BST
    • 31. Kth Element in Matrix
  • November 2024 GFG SOLUTION
    • 01. Swap and Maximize
    • 02. Kth Distance
    • 03. Is Linked List Length Even?
    • 04. Find All Triplets with Zero Sum
    • 05. Rotate by 90 Degrees
    • 06. Root to Leaf Paths Sum
    • 07. Split Array in Three Equal Sum Subarrays
    • 08. Minimum Repeats to Make Substring
    • 09. Minimum Sum
    • 10. Union of Two Sorted Arrays with Distinct Elements
    • 11. Make Array Elements Unique
    • 12. Meeting Rooms
    • 13. Intersection Point in Y Shaped Linked Lists
    • 14. Nearly Sorted
    • 15. Second Largest
    • 16. Move All Zeroes to End
    • 17. Reverse an Array
    • 18. Rotate Array
    • 19. Next Permutation
    • 20. Majority Element II
    • 21. Stock Buy and Sell – Multiple Transaction Allowed
    • 22. Stock Buy and Sell – Max One Transaction Allowed
    • 23. Minimize the Heights I
    • 24. Kadane's Algorithm
    • 25. Maximum Product Subarray
    • 26. Max Circular Subarray Sum
    • 27. Smallest Positive Missing Number
    • 28. Implement Atoi
    • 29. Add Binary Strings
    • 30. Anagram
  • October 2024 GFG SOLUTION
    • 01. Multiply Two Linked Lists
    • 02. Rotate and Delete
    • 03. Majority Vote
    • 04. Deletion and Reverse in Circular Linked List
    • 05. Not a subset sum
    • 6. Find the Number of Islands
    • 7. XOR Linked List
    • 8. Largest Pair Sum
    • 09. Linked List Matrix
    • 10. Max Distance Between Same Elements
    • 11. Reorganize The Array
    • 12. Two Smallest in Every Subarray
    • 13. Delete Alternate Nodes
    • 14. Count Linked List Nodes
    • 15. Subarray Range with Given Sum
    • 16. Two Swaps
    • 17. Split Linked List Alternatingly
    • 18. Single Number
    • 19. Nearest Multiple of 10
    • 20. Sort a K-Sorted Doubly Linked List
    • 21. Split the Array
    • 22. Sub-arrays with Equal Number of Occurrences
    • 23. Sum of Last N Nodes of Linked List
    • 24. Modify the Array
    • 25. Alternative Sorting
    • 26. Occurrence of an Integer in a Linked List
    • 27. Triplet Family
    • 28. Remove Duplicates in Array
    • 29. Quick Sort on Linked List
    • 30. Pairs with Difference k
  • September 2024 GFG SOLUTION
    • 01. Max Sum Path in Two Arrays
    • 02. Minimum Cost Path
    • 03. Minimum Number of Deletions and Insertions
    • 04. Count Ways to N'th Stair (Order Does Not Matter)
    • 5. Missing in Array
    • 06. Kadane's Algorithm
    • 07. Nth Natural Number
    • 8. Minimum Jumps
    • 09. Sort 0s, 1s, and 2s
    • 10. Circle of Strings
    • 11. Minimum Cost of Ropes
    • 12. Middle of a Linked List
    • 13. Mirror Tree
    • 14. Alternate Positive and Negative Numbers
    • 15. Binary Tree to DLL
    • 16. Longest Valid Parentheses
    • 17. Minimize the Heights II
    • 18. Parenthesis Checker
    • 19. Reverse Words
    • 20. Facing the Sun
    • 21. Clone a Linked List with Next and Random Pointer
    • 22. Longest Prefix Suffix
    • 23. Missing and Repeating
    • 24. Smallest Window in a String Containing All the Characters of Another String
    • 25. Palindrome Linked List
    • 26. Roof Top
    • 27. K Sized Subarray Maximum
    • 28. Minimal Cost
    • 29. Total Count
    • 30. Merge Two BSTs
Powered by GitBook
On this page
  1. 160 Days Of Problem Solving
  2. ✨160 Days of Problem Solving πŸ”₯

πŸŽ‰BONUS PROBLEMS 🎁

πŸš€1. Split array in three equal sum subarrays πŸ§ πŸš€2. Repetitive Addition of Digits πŸ§ πŸš€3. Maximize Number of 1's πŸ§ πŸš€4. Last Moment Before All Ants Fall Out of a Plank 🐜
PreviousDay 9. Minimize the Heights II 🧠Next1. Split array in three equal sum subarrays 🧠

Last updated 1 day ago