My test case not working

test case 4
1 1 1 3

code- https://ide.codingblocks.com/s/233936

What question are you talking about? Your code doesn’t seem to match the question the video

code- https://ide.codingblocks.com/s/234098

when i give 4 1 1 1 3 it give wrong output

Okay so your list has 5 numbers, what do you think the output should be , because your testcase simply doesn’t match the statement of question. Each number occurs twice except one number, find that number. This is the only reason why xor works ,because even occurrences cancels them out

1 Like