Use binary search in isCPUStringValid since the array is sorted.