James T. answered 06/03/19
Talented Programmer and Logician
In terms of efficiency, the second option is definitely more optimal. It reduces the amount of work and calculations that your CPU has to endure and takes up less temporary memory. A Binary search would work great! This process is not too fancy so not much code needs to be done.