Bifalgorithm post

Find the number 15 hiding in this sorted line in how few checks? Middle is 8, too small. Drop the left half. Middle is 20, too big. Drop the right half. Middle is 15, found it in just a few checks. That's binary search, half the list gone every check. Could you beat it? Follow.

Find the number 15 hiding in this sorted line in how few checks? Middle is 8, too small. Drop the left half. Middle is 20, too big. Drop the right half. Middle…

Ideas in this flowchart

  • Binary Search Process
  • Initial Setup
  • Find Number 15
  • Middle is 8
  • Too Small
  • Drop Left Half
  • Middle is 20
  • Too Big
  • Drop Right Half
  • Middle is 15
  • Found 15
  • Efficient Search
  • Challenge to Beat
Feed/

Find the number 15 hiding in this sorted line in how few checks? Middle is 8, too small. Drop the left half. Middle is 20, too big. Drop the right half. Middle is 15, found it in just a few checks. That's binary search, half the list gone every check. Could you beat it? Follow.

"Find the number 15 hiding in this sorted line in how few checks?"

👍
0
0 comments0 shares

Sign in to view and post comments.