Selection Sort

Selection sort finds minimum element of the unsorted elements and swaps it with the first element of unsorted part. It continues with the rest of the unsorted elements with this manner. Below is the implementation of selection sort. Note its worst case is O(n^2). #include <iostream> using namespace std; int find_min(int* arr, size_t size, int … Continue reading Selection Sort