Driver code
var arr = [ 12 , 11 , 13 , 5 , 6 , 7 ] ; var arr_size = arr . length ; document . write ( " " ) ; printArray ( arr , arr_size ) ; mergeSort ( arr , 0 , arr_size - 1 ) ; document . write ( " " ) ; printArray ( arr , arr_size ) ;