we can first count number of nodes in a subtree below each node.Now
transfer message to max(count(root->left),count->root->right);

On 11/1/13, kumar raja <[email protected]> wrote:
> Suppose we need to distribute a message to all the nodes in a rooted tree.
> Initially, only the root
> node knows the message. In a single round, any node that knows the message
> can forward it
> to at most one of its children. Design an algorithm to compute the minimum
> number of rounds
> required for the message to be delivered to all nodes.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].

Reply via email to