Loop in a pseudocode

165 Views Asked by At

I got the pseudocode:

enter image description here

With the array:

enter image description here

Then I have to find if $n=64$ how many times the while loop can be run at most with the call exists$(A,n,x)$? I think it's $0$ because we get $lo=0$, $hi=63$ and $mid=floor(\frac{63}{2})=31$ and $A[31]$ is not in our array, and we can not make any loop? Or what?