Step1:a) Temp=Call Procedure find_smallest_number.
(b) Set Loc = Location of smallest number.
(c) Set flag=0 if smallest number lies on boundary of
array.
Else set flag=1
Step2 If flag=1 then
Call procedure shift_ array(Loc)
Step 3 Set array[N]=Temp.
Decrement N by 1.
Repeat from 1 to 3 until N becomes 0.