consider it as a directed graph and sink is the celebrity.do dfs to find
sink...

On Sat, Dec 18, 2010 at 11:30 PM, snehal jain <[email protected]> wrote:

> In a n twitter set, a celebrity is defined as someone who is followed
> by everyone, but who follows no one. You need to identify the
> celebrities by asking to twitters the question: "do you know person
> x?" The answer will be yes/no. Find the celebrity by asking only O(n)
> questions.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
yezhu malai vaasa venkataramana Govinda Govinda

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to