We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I don't understand in case of input00.txt testcase why output.txt is the refrence output (output00.txt).
Let's me show you my problem through an example:
input00.txt:
50
231 -231 867 659 ........
output00.txt:
231
0
867
867
So my question is if BlackBox data structure contains only two elements (namely 867 and 659, because 231 already deleted)
why the maximum xor value is equal to 867??? Why not 867^659 == 496? At the 4th output position is it really correct value 867?
Many thanks!
No more comments
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Does the black box start out empty?
Did anyone solve this using a stream-based algorithm? If so, can you link the code? (I want to see if/how my solution can be improved)
Hi,
I don't understand in case of input00.txt testcase why output.txt is the refrence output (output00.txt). Let's me show you my problem through an example: input00.txt: 50 231 -231 867 659 ........
output00.txt: 231 0 867 867
So my question is if BlackBox data structure contains only two elements (namely 867 and 659, because 231 already deleted) why the maximum xor value is equal to 867??? Why not 867^659 == 496? At the 4th output position is it really correct value 867?
Many thanks!