Comment on Why is processing a sorted array faster than an unsorted array?parentComments−chiph13yUnless you have external information, you will need to take at least one pass through the data to determine if its sorted or not.
Comments
Unless you have external information, you will need to take at least one pass through the data to determine if its sorted or not.