Put in order · Python course · Module 2: Data Structures
Binary Search
Arrange the Binary Search steps in order:
Items to put in order
- Compare with the target value
- Find the middle element
- Repeat or return the result
- Choose the left or right half
Show the answer
Correct order:
- Find the middle element
- Compare with the target value
- Choose the left or right half
- Repeat or return the result