I started programming courses 4 months ago and I can't solve this problem according to it's required order .

I need your help as soon as possible and I think it is easy for you :D

thank's in advanced :)

a) Given an unsorted array of integers, your task is to sort the array by applying the following algorithm

(Assume that the input doesn’t contain duplicates ) :-

Execute the following steps starting from the first element in the array:

– Count the number of smaller elements to find the correct position i.

– If the element is in its correct position, move to the succeeding element.

– Otherwise, swap the current element with the one found in position i.

– Repeat the previous steps till you reach the last element.

b) What is the fundamental operation in the described algorithm? How many operations does it take?

Justify.