Question 1: Insertion

Time Complexity

This algorithm has a worst-case time complexity of $O(n^2)$, since it uses two nested for loops over the array.

Space Complexity

This algorithm has an auxillary space complexity of $O(1)$, since it uses only 2 variables (besides loop counters), both of which are primitive integers.