Skip to main content

Logic puzzle · Builder

Logic puzzle — order the algorithm

Technology · builds Coding

All activities

Arrange the steps so the search terminates correctly on every input.

Text description of this activity

Order five binary-search steps: sort the input, set low and high, loop while low is not greater than high, compare the midpoint, narrow the bounds.

    Attempt 0 · 45 XP available

    Put this into practice in the related mission.

    Open mission