Driver Code
let arr = [ 5 , 7 , 8 , 9 ] ; let n = arr . length ; initialize_xor ( arr , n ) ; let Q = [ [ 5 , 6 ] , [ 8 , 1 ] ] ; for ( let i = 0 ; i < Q . length ; i ++ ) { find_xor ( Q [ i ] [ 0 ] , Q [ i ] [ 1 ] ) ; }