Trie interview challenge

i am not able to do this question.
pls tell the correct code.

@yutikakhanna hey,apko is question me subarray nikalna hai jiska max xor ho ,here is code for reference:
https://ideone.com/Ds6Kwb
Feel free to ask any doubt.