Problem Statement ================= : Given a list which initially contains 0, the following queries can be performed:
0 X : Add X to the List
1 X : Replace each element in List With its XOR with X (i.e. Replace A with A^X where is ^ is an XOR operation)
Return a list in increasing order after all queries.
-------- Sample :
-------- Q=5
0 4
0 2
1 4
0 5
1 8
Answer : 8 12 13 14
Let me know the concept in this problem :
Thanks.