keep a global pointer and a global variable "check=0"
do inorder traversal..instead of printing the value do
if(check==0)
save pointer
check==1
else
check==0;
correct me if m wrong
On Tue, Sep 27, 2011 at 2:22 PM, anshu mishra <[email protected]>wrote:
> do the inorder traversal as soon as reached at n/2th element that will be
> median.
>
> --
> 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.
>
--
*Dheeraj Sharma*
Comp Engg.
NIT Kurukshetra
--
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.