filmov
tv
Find the missing Element in the array

Показать описание
Find the element that appears once in a sorted array where all other elements appear twice one after another. Find that element in 0(logn) complexity.
Input: arr[] = {1, 1, 3, 3, 4, 5, 5, 7, 7, 8, 8}
Output: 4
Input: arr[] = {1, 1, 3, 3, 4, 5, 5, 7, 7, 8, 8}
Output: 4