4 subtopics · 19 problems
Sorting & Searching
Sorting-based reasoning, binary search on arrays, and binary search on the answer.
01Custom Sorting & Comparators
Sort with custom logic, then sweep or query.
3 easy1 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 339AHelpful Maths | easy | Solve |
| 405AGravity Flip | easy | Solve |
| 1850DBalanced Round | easy | Solve |
| 1881DDivide and Equalize | medium | Solve |
| 1850GThe Morning Star | hard | Solve |
02Binary Search on Sorted Array
Use lower_bound/upper_bound to answer queries in O(log n).
2 easy2 medium1 hard
| Problem | Difficulty | Link |
|---|---|---|
| 706BInteresting drink | easy | Solve |
| 1850ECardboard for Boxes | easy | Solve |
| 1843DApple Tree | medium | Solve |
| 1462DAdd to Neighbour and Remove | medium | Solve |
| 1862EKolya and Movie Theatre | hard | Solve |
03Binary Search on the Answer
Guess the answer, check feasibility, and narrow the search space.
4 medium2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 1873EBuilding an Aquarium | medium | Solve |
| 1843ETracking Segments | medium | Solve |
| 812CSagheer and Nubian Market | medium | Solve |
| 1201CMaximum Median | medium | Solve |
| 1900DSmall GCD | hard | Solve |
| 460CPresent | hard | Solve |
04Ternary Search
Find the maximum/minimum of a unimodal function.
1 medium2 hard
| Problem | Difficulty | Link |
|---|---|---|
| 439DDevu and his Brother | medium | Solve |
| 578AA Problem about Polyline | hard | Solve |
| 782BThe Meeting Place Cannot Be Changed | hard | Solve |
Was this helpful?