I've a sorted array but it's not necessarily sequential, and I need to know IF it contains any duplicates.
Array : | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 8 |
I know we can linearly traverse in O(n) check if it contains any duplicates, but I was wondering if it is possible using Binary Search.