A bisection algorithm repeatedly divides an ordered search range to locate a target or insertion position. For interval searches, it makes an ordered list a stronger choice than repeatedly looking up every element in a set or dictionary. section 2.3.3
Use the technique when:
- The values are ordered and the search concerns a range rather than one exact key. section 2.3.3
- A linear membership scan through a large list could become a production bottleneck. section 2.3.3
- You need to weigh the simplicity of lists against specialized set or dictionary lookups. section 2.3.3
