Single Element in a Sorted Array
1. Shizuka’s lucky number will surely be present. 2. There will only be a single lucky number.
The first line contains a single integer ‘N’, representing the total number of elements present in Shizuka’s list. The next line contains ‘N’ single-spaced elements, representing the elements of Shizuka’s list
Print an integer denoting the lucky number of Shizuka.
1 <= N <= 10^5 0 <= data <= 10^9 Where ‘data’ is the value of elements of Shizuka’s list. Time Limit: 1 sec
You do not need to print anything, it has already been taken care of. Just implement the given function.
The idea here is to use the fact that the array is sorted and the element of the array (‘arr[i]’) is unique if it doesn't have an adjacent element that has the same value as ‘arr[i]’.
Search In A Sorted 2D Matrix
Ninja And The Strictly Increasing Array
Negative To The End
Fake Coin Problem