How fast is binary search?
b.length no.of iterations log(b.length+1)
0 = 20 - 1 0 0
1 = 21 - 1 1 1
3 = 22 - 1 2 2
7 = 23 - 1 3 3
15 = 24 - 1 4 4
32767 = 215 -1 15 15
1048575= 220 -1 20 20
j is the �base 2 logarithm of 2j.
m is the base 10 logarithm of 10m.
Previous slide
Next slide
Back to first slide
View graphic version