Want to know Hint for Question : Good India Summer Internship Program 2021 — Coding Test — 16 August (Ended)

Revision en1, by CodingBeast23, 2020-08-21 16:48:02

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.

Tags #google

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English CodingBeast23 2020-08-21 17:19:23 750
en2 English CodingBeast23 2020-08-21 16:49:11 8
en1 English CodingBeast23 2020-08-21 16:48:02 591 Initial revision (published)