On Mar 23, 8:17 am, "tuesday" <[EMAIL PROTECTED]> wrote:
> u can use a queen in bfs traverse
>
> void visit(Node* r)
> {
>
> }
>
> void BF_Traverse(Node* r)
> {
>    queen<Node*> q;
>    q.push(r);
>    while(!q.empty())
>    {
>           Node* t = *q.front();
>           q.pop();
>           visit(t);
>           if(t->left !=0)
>              q.push(t->left);
>           if(t->right!=0)
>              q.push(t->right);
>    }
>
> }





any one plz explain the above code.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to