Error:
do not know how to do: definition of celebrity:
- n - 1 knows him
- him do not know n - 1
In order word, if know(A -> B) == true, it means A must not be the celebrity, B may be the celebrity; if know(A -> B) == false, it means A may be the celebrity, B must not be the celebrity.
So first we get the last celebrity which know(A -> B) == false, then check if current celebrity know any of them. O(N) time complexity