You are given a set of 9,000,002 (nine million and two) full positive integer values in ascending order. They start at the number one (n=1) and all of the integers have different values, which are unknown. All the integers have the same number of increments between them. Without knowing the value of any other numbers in the set, except for the first value, what is the quickest way of starting the process of finding the highest number value, at least from the given solutions put forward? (An easier and more direct solution can be found in the discussions).
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
As you are given 9,000,002 full integer number values which start at the number 1 in ascending order - to allow for the possibility that they might increase in increments of one, you must first scan for the value 9,000,002, to see whether it occurs in the set, before proceeding, to find the highest integer value. (If the number does not occur in the set then you know for certain that at least one of the integers is greater than 9,000,002). (If the number 9,000,002 does occur in the set then you have found at least one of the values which is higher than 1, but must perform further scan to ascertain the highest integer value).