Recently, I found a problem that I was able to solve using binary search but I couldn't make it fit the standard "boolean predicate" approach. Do you want to take a look and see if you can find such predicate? Or even better, a more general idea to approach binary search problems?
Solution to the fake coin puzzle is out now!
https://open.substack.com/pub/kanaye/p/solving-coin-puzzles?r=28yydd&utm_campaign=post&utm_medium=web&showWelcomeOnShare=true
Very well explained. Thanks for this beautiful collaboration.
Great post!
Thanks, Stephen. It means a lot coming from you.
Recently, I found a problem that I was able to solve using binary search but I couldn't make it fit the standard "boolean predicate" approach. Do you want to take a look and see if you can find such predicate? Or even better, a more general idea to approach binary search problems?
Here's the link: https://leetcode.com/problems/find-peak-element/description/
I will take a look and get back to you. Thanks for sharing.