You are given an array of integers nums where every element appears exactly twice, except for one unique element that appears only once.
Your task is to find and return the element that appears only once.
You must implement a solution that runs in linear time (O(n)) and uses constant extra space (O(1)).
Input: nums = [5, 3, 5]
Output: 3
Input: nums = [7, 8, 7, 9, 9]
Output: 8
Accepted:
Submission: