In a party of n people, a celebrity is someone who is known by everyone but knows no one. Given an n x n adjacency matrix where matrix[i][j] == 1 means i knows j, find the celebrity index.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.