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 seem to grasp the logic behind this piece of code. How does successively xor-ing the inputs with a does the job?
It seems to me that you have assumed that the inputs will be entered in an ascending order. Correct me if I am wrong.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →
I don't seem to grasp the logic behind this piece of code. How does successively xor-ing the inputs with a does the job? It seems to me that you have assumed that the inputs will be entered in an ascending order. Correct me if I am wrong.