Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
7
  • 6
    binary search only works on sorted lists Commented Dec 17, 2015 at 5:33
  • 3
    midpoint is a string. What should midpoint - 1 do? Commented Dec 17, 2015 at 5:33
  • @FernandoMatsumoto might be a typo. I think he meant middle - 1, middle + 1. Commented Dec 17, 2015 at 5:35
  • To do a successful binary search on an array, the data in the array must be in sorted order. The entries for all except Brian are out of position — the sequence should be Brian, Joe, Lois, Meg, Peter, Stewie. Commented Dec 17, 2015 at 5:35
  • @jianweichuah I think Fernando is pointing out the bug. Commented Dec 17, 2015 at 5:36

lang-py

AltStyle によって変換されたページ (->オリジナル) /