diff --git a/selection_sort.cpp b/selection_sort.cpp new file mode 100644 index 0000000..0cd8ea4 --- /dev/null +++ b/selection_sort.cpp @@ -0,0 +1,36 @@ +#include +#include + +using namespace std; + +void selection_sort(vector &A,int N){ + int min, temp; + for(int i=0;i>N; + + vector A(N); + cout<<"Enter the elements (space separated): "; + for(int i=0;i>A[i]; + } + selection_sort(A,N); + cout<<"Sorted list: "; + for(int i=0;i