Video does not include the test case where
array is [0,0,0,0,0,0,5].
In such a test case, How do identify whether the middle element is the starting point of the pair or the end point of the pair.
Lonely Element in a Sorted Array
u can simple start at n/2 where n is the size of the array
then u can check for adjacent elements
if either of the adjacent element is same, it is NOT a lonely element
else it is