what is nth element of a tree u mean nth element in the inorder traversal?
@sharad what are u trying to do with this code??

On Fri, Nov 6, 2009 at 4:01 PM, sharad kumar <aryansmit3...@gmail.com>wrote:

> stack<struct node *>st;
> start with root
> ptr=root;
> while(ptr!=null&&count!=k)
> {
> st.push(ptr);
> ++count;
> if(ptr->left!=null)
> ptr=ptr->left
> else
> ptr=ptr->right
>
>
>
>
> On Tue, Nov 3, 2009 at 11:47 AM, naren <lalavat38na...@gmail.com> wrote:
>
>> can anyone help me to solve this..how can we find nth element of a
>> tree without 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 algoge...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

--

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


Reply via email to