I am trying to find the position of an element in set using lower bound or binary search i.e, in lg(n) time.
For example, Elements in set are: 1 2 4 5 7.
I need to find the position of 4 which is in 3rd position. I have tried but can't do this. Is there any way ?
Thanks in Advance.