Divide and Conquer: Easy to Hard Problems
Easy
- Merge Sort (Implementation of the merge sort algorithm)
- Binary Search (Basic binary search on a sorted array)
- Quick Sort (Implementation of the quick sort algorithm)
- Count Inversions (Counts the number of inversions in an array using merge sort)
- Find Peak Element (Finds a peak element in an array with divide and conquer)
Medium
- Median of Two Sorted Arrays (Finds the median of two sorted arrays using binary search)
- Closest Pair of Points(Finds the closest pair of points in a 2D plane using divide and conquer)
- Find Kth Largest Element in an Array (Finds the Kth largest element using quick select)
- Strassen’s Matrix Multiplication (Optimized matrix multiplication using divide and conquer)
- Count of Smaller Numbers After Self (Counts the number of smaller elements after each element using merge sort)
Hard
- Maximum Subarray Sum with One Deletion (Finds the maximum subarray sum with at most one deletion)
- Matrix Chain Multiplication (Finds the optimal way to multiply a given sequence of matrices)
- Largest Rectangle in Histogram (Finds the largest rectangle area in a histogram using divide and conquer)
- Kth Smallest Element in a Sorted Matrix (Finds the Kth smallest element in a sorted matrix using binary search)
- 4Sum (Finds all unique quadruplets in an array that sum up to a target value)