Prlet the required permutation
for ( let i = 1 ; i < L ; ++ i ) { document . write ( v1 [ j ] + " " ) ; j ++ ; } for ( let i = L ; i <= R ; ++ i ) { document . write ( v [ f ] + " " ) ; f ++ ; } for ( let i = R + 1 ; i <= N ; ++ i ) { document . write ( v1 [ j ] + " " ) ; j ++ ; } } return ; }