give nonempty array integer nums element appear twice find single oneyou implement solution linear runtime complexity use constant extra space Example 1input num 221output 1Example 2input num 41212output 4example 3input num 1output 1 Constraints1 numslength 3 1043 104 numsi 3 104Each element array appear twice element appear