Selection sort : In selection sort we will divide the Array in 2 parts , sorted and unsorted and select the min element from unsorted and will copy to sorted array. Time Complexity for selection sort also is O(n^2). space complexity for bubble sort will be O(1). class SelectionSort { public static void sort ( int [] array) { int n = array. length ; for ( int i = 0 ; i < n - 1 ; i++) { int min = i ; for ( int j = i + 1 ; j < n ; j++) { if (array[j] < array[min]) { min = j ; } } swap (array , i , min) ; } } private static void swap ( int [] array , int i , int j) { int temp = array[i] ; array[i] = array[j] ; array[j] = temp ; } private static void print ( int [] array) { System. out .print( "[" ) ; for ( int i = 0 ; i < array. length ; i++) { System