SelectionSort
Selection Sort.
Repeatedly selects the smallest element from the unsorted portion and moves it to the beginning.
Time complexity:
Best: O(n²)
Average: O(n²)
Worst: O(n²)
Space complexity:
O(1)
Selection Sort.
Repeatedly selects the smallest element from the unsorted portion and moves it to the beginning.
Time complexity:
Best: O(n²)
Average: O(n²)
Worst: O(n²)
Space complexity:
O(1)