Binary search would be best option if you have elements sorted.