Driver Code
let A = [ 1 , 2 , 5 , 3 , 4 , 6 ] ; let B = [ 0 , 1 , 1 , 1 , 0 ] ; let n = A . length ; if ( sortedAfterSwap ( A , B , n ) == 0 ) document . write ( " " ) ; else document . write ( " " ) ;