Computer Science, asked by prameelaanil77, 11 months ago

write an algorithm to selection sort​

Answers

Answered by Zisha7
2

Answer:

Selection Sort Algorithm

Set the first element as minimum .

Compare minimum with the second element. If the second element is smaller than minimum , assign second element as minimum . ...

After each iteration, minimum is placed in the front of the unsorted list.

For each iteration, indexing starts from the first unsorted element.

Answered by Anonymous
2

Selection sort Algorithm:-

  • Start with index 0 , and campare it with all element in array.
  • the smallest one which caught should be swap with index 0.
  • step 1 and step 2 is repeated.
Similar questions