Insert the incremented value if an operation is performed on the ith index
var extra = ( ( arr [ i ] [ 0 ] + 1 ) / ( arr [ i ] [ 1 ] + 1 ) ) - ( arr [ i ] [ 0 ] / arr [ i ] [ 1 ] ) ; q . push ( [ extra , i ] ) ; } q . sort ( ) ;