I know the algorithm of “Binary Search” but don’t understand when and where to implement it.
Please suggest me of how and when to apply binary search?
Solve this Problem, and you’ll understand where can Binary Search be applied.
Note: To solve this problem, knowledge of Prefix sum is also required.
Check out this blog in Topcoder BinarySearch. It explains everything really well.