03. Sorting
🧠Sorting Strategy
- Custom Comparators: When sorting objects or specific orders (like
Largest Number), define a custom logic. - Inversion Count: This is a classic Merge Sort modification.
- Binary Search: Look for the Search Space (Index vs Answer).
🟢 Basic Sorting Logic
- Noble Integer
- Elements Removal
- Arithmetic Progression
- Sort By Color
- Largest Number
- Unique Elements
- Array Consecutive Elements
- Max Mod
- Chocolate Distribution
🟡 Merge & Quick Sort
- Merge Two Sorted Arrays
- Inversion Count
- Reverse Pairs
- Quick Sort
- Kth Smallest Element
- Maximum Unsorted Subarray
- Maximum Minimum Magic
- Sum The Difference
- B Closest Points To Origin
🔵 Binary Search: Basics
- Sorted Insert Position
- Search For A Range
- Find Peak Element
- Single Element Sorted Array
- Matrix Search
- Rotated Sorted Array Search
- Search Bitonic Array
🔴 Binary Search: Advanced
- Square Root Integer
- Special Integer
- Ath Magical Number
- Kth Price
- Matrix Median
- Painters Partition Problem
- Aggressive Cows
- Allocate Books
- Food Packets Distribution