Binary Search Tutorials
Binary search
Ternary search
tip
Note: Ternary search problems can also be solved using binary search, by considering the function g(x) = f(x) > f(x-1)
as a monotonic function. See this blog for more details.
Session slides
The whiteboard slides, used during the session on Binary search, are available here
The whiteboard slides, used during the session on Ternary search, are available here
Additional resources
- Watch this series of 5 short lectures on Binary search by codeforces