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.
Can u help me to write a O(n) solution? I just sorted the array and looped over it again using simple compare to find the element. The solution got accepted and passed all the test cases. @Shashank21j, Before applying the xor operation, the input needs to be sorted right?
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 →
Can u help me to write a O(n) solution? I just sorted the array and looped over it again using simple compare to find the element. The solution got accepted and passed all the test cases. @Shashank21j, Before applying the xor operation, the input needs to be sorted right?