diff --git a/SelectionSort.java b/SelectionSort.java new file mode 100644 index 0000000..ef8d735 --- /dev/null +++ b/SelectionSort.java @@ -0,0 +1,32 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package sort; + +/** + * + * @author User + */ +public class SelectionSort { + + private static void exch(int[] a,int i,int j){ + int t=a[i]; + a[i]=a[j]; + a[j]=t; + } + public void sort(int[] a){ + int N=a.length; + for(int i=0;i