Driver code
var arr = [ 2 , 0 , 1 , 4 , 5 , 3 ] ; var n = arr . length ; document . write ( " " + " " ) ; printArray ( arr , n ) ; rearrange ( arr , n ) ; document . write ( " " ) document . write ( " " + " " ) ; printArray ( arr , n ) ;