O(2*logn) does work


#1

Finding pivot first and then searching for element works for me. Try to write iterative code instead of a recursive one. Recursion always has some computation overhead