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
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