Inserts each element into its correct position in a growing sorted portion of the array.
Explain code with DocComment! Try out your own code!