Brainlag
  1. Library
  2. Challenges
  3. C

Find a player by ID, fast

Search a sorted array of 100,000 player IDs with binary search, halving the range each step, and prove it with a step counter.

CStretch25 minPremium

Premium

Inside: 2 checks, no scaffolding.

See Premium£7.99 a month. Already Premium? Sign in

Code editor. Press Control or Command plus Enter to run the code. Tab indents; to move focus out of the editor, press Escape and then Tab.