Forgetting to verify convexity. If isn't convex, binary search won't find the right .
Not handling ties properly. When multiple values give the same cost, track counts carefully.
Wrong binary search bounds. Start with reasonable bounds on : typically .
Precision issues with floating-point . Sometimes you need integer binary search with careful rounding.