WA in testcase 1 pls tell the corner case?
WA in testcase 1 pls tell the corner case?
@divyamsaxena123
I think you got the question wrong. You are not required to display the number of unique elements but rather the unique element itself. All elements will occur twice except one. You are required to display that one element which only occurs once in the array. You are required to solve this problem without using any extra space ( you cannot make a set or array or any other data structure ) and solve this in O(n) time. Use bitwise operators to solve this problem.
Input :
7
56 87 12 65 56 65 87
Expected Output :
12
Your Output :
4
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.