Space and Time Complexity

*Average case: O(N log N)
*Worst case: O(N2)
Question: How can we improve the code we wrote earlier?
Comments