## Wednesday, August 30, 2017

### An Interesting Math + Data Structure Problem from Codeforces (Round #430)

Hi guys! ✋
rachit jain blog, Rachit Jain, rachit jain iit roorkee, rachit jain iitr, rachit iitr,rachit codechef, rachit hackerrank, rachit jain microsoft

This is a data structure(TRIE) + math based problem from Codeforces Round #430.
You are given an array $A$ of size $N$, and you have to perform $M$ operations on it.
In each operation, you are given an integer $x$, and you perform XOR operation of every element of the array with $x$. Note that the array is updated after every operation and subsequent operations are performed on modified array. At end of every operation, you need to print the mex value of the updated array.

NOTE: mex of a set $A$ is the least whole number ( $\ge 0$ ) which is not present in $A$.
Check out the following video where I've described the solution:
CodeForces Round 430 - Problem D Tutorial (Number Theory, Trie)

Refer the Video Description to find the links to source code and problem link.
If you liked my efforts, please hit the like button 👍, subscribe and share the videos among your college :D

Have a good day! 😆