✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
for (i = 1; i<=n-1; i++)
{
buf = a[i];
j = 0;
while (buf > a[j])
j ++ ;
for (k=i-1;k>=j;k--)
a[k+1] = a[k ];
a[j] = buf;
}