Write an algorithm for insertion sort method.
Step 1: for i = 1 to n-1 Repeat step 2 Step 2: for j = i downto 1 Repeat step 3 Step 3: is ( a[j] < a[j-1])? then temp = a[j] A[j] = a[j-1] A[j-1] = temp [ end of j loop] [ end of i loop]