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

1742 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

Explain how the fetch execute cycle works? Include the specific registers and buses being used


The numbers 6B and 12 are displayed in hexadecimal form. Convert them into binary form and perform binary addition to find the sum. Convert your answer back into hexadecimal. Show your workings.


Given an ordered array of integers "V" and a integer "Sum", write a function that would return "true" if it finds two numbers in V that add up to Sum, and "false" otherwise.


What is method "Overloading" in object-oriented programming (OOP) ?


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:

© 2026 by IXL Learning