To discover a positive unknown integer by comparisons, test the thresholds for fixed . If the first threshold not smaller than has index , fewer than candidates remain and binary search needs at most comparisons. Since , the total is at most . Choosing makes the leading constant at most ; the additive constant may depend on .
Articles by others on the same topic
There are currently no matching articles.