function is_sorted(items):
   for i from 1 to length(items) - 1:

      if items[i - 1] > items[i]:
        return false
   return true
 # once sorted, binary search, deduplication, and merging all become cheap
