Correct solution for Single Number II