Answer:1. [Initialization]
temp
key <-- 1
ctr
2. [Following loop makes the elements sortarray [0] through sortarray [key] in order by inserting the element sortarray [key] at its pos. initially sortarray [0] may be through of as sorted array].
Repeat while key < size
temp <-- sortarray [key]
ctr <-- key – 1
Repeat while ctr >=0 and tamp <sortarray [ctr]
sortarray [ctr+1] <-- sortarray [ctr]
ctr--
sortarray [ctr+1] <-- temp
key++.