LC: Find the Index of the Large Integer

Find the Index of the Large Integer

The Essence:

Instead of these integers, once can imagine there are weights instead and one needs to find the heavy weight by putting these on a scale. If some side weighs heavy, you would split that side into 2 and compare, until you compare only 2 weights to find which one is the heavier.

Reducing complex-seeming problems to more familiar ones can aid in the problem-solving process.

Details:

The same can be done here. The queries sent to the array reader can binary search through the reader to find this one single large integer.

Last updated