Find duplicates under given constraints
A sorted array contains 6 different numbers, only 1 number is repeated five times. So there are total 10 numbers in array. Find the duplicate numbers using two comparisons only. Examples : Input: arr[] = {1, 1, 1, 1, 1, 5, 7, 10, 20, 30} Output: 1 Input: arr[] = {1, 2, 3, 3, 3, 3, 3, 5, 9, 10} Outpu