30:00
Builds the final sorted array (or list) one item at a time by comparisons. Return the sorted array.
1≤arr.length≤1041 \leq \text{arr.length} \leq 10^41≤arr.length≤104
−109≤arr[i]≤109-10^9 \leq \text{arr}[i] \leq 10^9−109≤arr[i]≤109