Given an unlimited number of light bulbs (that break at a certain height), and a building with 100 floors, how do you determine the height that the light bulb breaks?

The solution is a binary search algorithm (where you start on floor 50th and move up or down depending if the bulb breaks or not, always picking the middle floor of your option range).

DG
Answered by Diana G. Computing tutor

1527 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

why is the Harvard architecture is sometimes used in preference to the von Neumann architecture and give examples of each system


Convert the base-10 number 74 into an 8-bit binary number


What is 55 using 8-bit unsigned binary?


Describe a stack data structure.


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences