Here is one of my interview question. Given an array of N elements and where an element appears exactly N/2 times and the rest N/2 elements are unique>
This is a poor interview question.
Mostly because of the first one. What are you looking for? That the candidate should come up with this O(log n) solution you don't know exists? If you have to ask StackOverflow, is this something you can reasonably expect a candidate to come up with in an interview?