- using exact binary search code provided by Python docs