For eg: if the array is 1,8,5,8,1,3,5 then your program should return 3.
This can be achieved by XORing all the elements in the array. The final value in the variable after XORing is the result
For eg: if the array is 1,8,5,8,1,3,5 then your program should return 3.
This can be achieved by XORing all the elements in the array. The final value in the variable after XORing is the result
No comments:
Post a Comment