Hi Sarad,
use queue with recursion,
void levelorder traverse(QUEUE qt)
{
if(isempty(qt))
return;
bst *temp = remove(qt);
printf("%d",temp->data);
if(temp->left)
insert(qt, temp->left);
if(temp->right)
insert(qt, temp->right);
levelordder(qt),
}
On Sat, Jul 10, 2010 at 10:45 PM, sharad kumar <[email protected]>wrote:
> How to do level order traversal using recursion ?
>
> --
> 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.
>
--
Thanks & Regards
Umesh kewat
--
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.