Write an algorithm of selection Sort
Answers
Answered by
0
Answer:
Example of Selection Sort.Algorithm for Selection Sort:Step 1 − Set min to the first location.Step 2 − Search the minimum element in the array.Step 3 – swap the first location with the minimum value in the array.Step 4 – assign the second element as min.Step 5 − Repeat the process until we get a sorted array.
Answered by
1
Answer:
Selection Sort in C
Example of Selection Sort.
Algorithm for Selection Sort:
Step 1 − Set min to the first location.
Step 2 − Search the minimum element in the array.
Step 3 – swap the first location with the minimum value in the array.
Step 4 – assign the second element as min.
Step 5 − Repeat the process until we get a sorted array.
Attachments:
Similar questions