Single Element in a Sorted Array
Given a sorted array in which all elements appear twice and one element appears only once, the task is to find the element that appears once.Examples: Input: arr[] = {1, 1, 3, 3, 4, 5, 5, 7, 7, 8, 8}Output: 4Explanation: All numbers except 4 occur twice in the array.Input: arr[] = {1, 1, 3, 3, 4, 4,