Will Arrays.sort() increase time complexity and space time complexity?

I am assuming you are talking about Java here. So the loop will cost O(n) time, my question is that will Arrays.sort() cost more time? Yes, Arrays.sort(int[]) in all Java standard library implementations that I know, is an example of a comparison-based sort and thus must have worst-case complexity Ω(n log n). In particular, Oracle Java 7 uses … Read more