Can Arrays.binarySearch() in java always be used to find the index of floor or ceil element appropriately because it uses the insertion point idea in it ?
Because in The Wave we were able to directly use it.
Can Arrays.binarySearch() in java always be used to find the index of floor or ceil element appropriately because it uses the insertion point idea in it ?
Because in The Wave we were able to directly use it.
I used it. See my Code CodeChef: Practical coding for everyone. works same as c++ lower_bound. For floor and ceiling. I think needs to use treeset