What is the worst case target number for binary search?

Viewed 45

For simplicity, let's say the number is between 1 and n. Is there a generic formula that gives us the number that results in the maximum number of binary search iterations?

I always have to write things about by hand, but I feel there should be an analytical form that is a function of n.

0 Answers
Related