Implement binary search variations
- Dominant language
- Hy
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Create a collection of binary search algorithm implementations:
## Basic binary search:
- Standard binary search
- First occurrence of element
- Last occurrence of element
- Count of occurrences
- Search in rotated sorted array
- Find peak element
## Advanced applications:
- Binary search on answer (parametric search)
- Search in 2D sorted matrix
- Median of two sorted arrays
- Allocate minimum number of pages
- Aggressive cows problem
- Capacity to ship packages within D days
## Requirements:
- Handle edge cases and empty arrays
- Provide both recursive and iterative implementations
- Document time and space complexity
- Include detailed explanations of boundary conditions
This collection will demonstrate the versatility of binary search beyond simple sorted array lookups.
Contributor guide
Assessment
This issue has not been assessed yet.