nowfound

Life & fun · June 23, 2019

AG

A game I made to explain binary search to non programmers

A game I made to explain binary search to non programmers launched on June 23, 2019 with 7 votes, #913 of 2,757 launches that month and more than 50% of that year's launches. The site was still online in September 2026, 7 years on.

What it does

{{page.title}}

The idea here is to demonstrate the power of binary search algorithms to non-programmers and beginner programmers. The user should first try and create a strategy for finding the treasure. Most likely the user will stumble upon a strategy very similar to binary search. Try starting with a one dimensional array first. Binary search strategy can be summarized by: dividing the grid in half each time until you reach one possible cell. The number of times it takes to divide a number in half until you reach one is the definition of log_base_2(N) . Therefore, in this case the best number of guesses is log_base_2(totalCells) . Checkout the solver tab to see binary search in action. I would like to…from treasure.surge.sh

Does a similar job

all alternatives →
  • Codehunt2016 · ▲61

    Educational coding game.

  • zero2015 · ▲55

    A mathematical puzzle game

  • 0RBITALIS2015 · 0rbitalis.com · ▲60

    An abstract gravitational puzzler

  • Color2015 · color.method.ac · ▲80

    A color matching game

  • Splice2015 · cipherprime.com · ▲60

    An experimental and artistic puzzler

  • CG
    Codebattle – game for coders2015 · battle.hexlet.io · ▲7

More life & fun this month

the category →

Source: Show HN post ↗

Launched alongside, June 2019

the whole month →