Write an algorithm selection sort.
Answers
Answered by
2
Selection sort is a simple sorting algorithm. This sorting algorithm is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list
Answered by
1
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