diff --git a/algorithms/selectionSort.cpp b/algorithms/selectionSort.cpp new file mode 100644 index 00000000..afc39db7 --- /dev/null +++ b/algorithms/selectionSort.cpp @@ -0,0 +1,35 @@ +#include +using namespace std; + +void selection_sort(int a[], int n){ + +for(int i = 0; i< n; i++){ + + int min_position = i; + for(int j = i; j