Computer Science, asked by tusharksable2000, 2 months ago

Write a c' program to sort
a number inaccending order
Using insertion Sort.​

Answers

Answered by Anonymous
1

Answer:

Before going through the program, lets see the steps of insertion sort with the help of an example.

Input elements: 89 17 8 12 0

Step 1: 89 17 8 12 0 (the bold elements are sorted list and non-bold unsorted list)

Step 2: 17 89 8 12 0 (each element will be removed from unsorted list and placed at the right position in the sorted list)

Step 3: 8 17 89 12 0

Step 4: 8 12 17 89 0

Step 5: 0 8 12 17 89

Similar questions