Driver code
var arr = [ 23 , 78 , 45 , 8 , 32 , 56 , 1 ] ; var n = 7 ; minMaxSelectionSort ( arr , n ) ; document . write ( " " ) ; for ( var i = 0 ; i < n ; i ++ ) document . write ( arr [ i ] + " " ) ; document . write ( " " ) ;