previous | start | next

Answers

  1. You would search about 20. (The binary log of 1,024 is 10.)
  2. Then you know where to insert it so that the array stays sorted, and you can keep using binary search.
  3. Otherwise, you would not know whether a value is present when the method returns 0.


previous | start | next