Taken from Introduction to Algorithms
Describe a Θ(n lg n)-time algorithm that, given a set S of n integers and another integer x, determines whet
Your analysis is correct, and yes you must sort the array or else binary search does not work.