• + 2 comments

    Your input array is incorrectly framed! Read the problem statement carefully. It is said, "All but one integer occur in pairs". Here you have two numbers which does occur in singlet which contradicts the problem statement.