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

1577 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

What is the difference between interpreted and intermediate code?


Write a small program, in pseudocode or otherwise, that demonstrates a recursive algorithm. Write a small explanation of how recursion is used in your program.


What is the decimal equivalent of the following sequence of bits, which represents an unsigned binary integer: 1101001. What is the decimal equivalent if the sequence in bits encodes a two’s complement binary integer.


What is the difference between an array and a record?


We're here to help

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

MyTutor is part of the IXL family of brands:

© 2025 by IXL Learning