Re: please help with this question
- From: Eric Sosman <esosman@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Dec 2007 09:52:57 -0500
Totti wrote:
Hi all, Happy new year first of all, to all of you.
i am wondering about what would be the answer of the following:
Is there a heap 'X', sorting 'n' distinct elements (n = 7 for
instance) such that :
- a preorder traversal of 'X' yields the elements of 'X' in sorted
order?
- how about an inorder traversal?
- how about a postorder traversal?
Thanks in advance for any help.
For n = 0, all three traversals produce sorted order.
For n = 1, all three traversals produce sorted order.
Et cetera.
(Your instructor will be especially impressed if you use
the phrase "mathematical induction" to describe this method
of proof. Good luck!)
--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: please help with this question
- From: Lew
- Re: please help with this question
- References:
- please help with this question
- From: Totti
- please help with this question
- Prev by Date: please help with this question
- Next by Date: Re: Open Source Java Quicksilver for Windows/Linux
- Previous by thread: please help with this question
- Next by thread: Re: please help with this question
- Index(es):