To see the question, click here.
Naive Approach
To find the single element, we can first sort the array and then check for the single element. This approach works because each element appears twice except for one, and when the array is sorted, these ...