When the question is the smallest (or largest) value that works, and “does x work?” is a check that flips only once as x grows, binary search the answers instead of an array: about log₂ of the range in checks, against one check per answer.
This interactive visualization needs JavaScript.