please help with this question



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.

** it is not a homework, it is a question in a book i am using to
learn data structres, after each chapter it has some questions, which
i m trying to answer, i got stuck in this one.
.



Relevant Pages

  • Re: please help with this question
    ... no it is not a homework, it is a question in a book i am using to ... learn data structres, after each chapter it has some questions, which ... i m trying to answer, i got stuck in this one, thats all! ...
    (comp.lang.java.help)
  • Re: what a piece of shit
    ... hard, you do your homework and you make an effort to be smart, you can do ... you get stuck in Iraq." ... This douchebag almost became President. ...
    (misc.fitness.weights)
  • Re: long integer multiplication
    ... Joe Estock writes: ... Please do your own homework or at least attempt to do your own ... homework and if you get stuck then post your code. ... Since you have declared that this is urgent I suggest ...
    (comp.lang.c)
  • Re: what a piece of shit
    ... hard, you do your homework and you make an effort to be smart, you can do ... you get stuck in Iraq." ... This douchebag almost became President. ...
    (misc.fitness.weights)
  • Re: long integer multiplication
    ... Please do your own homework or at least attempt to do your own ... homework and if you get stuck then post your code. ... Since you have declared that this is urgent I suggest ... I don't mind working with code even if it's originally from someone else, but I do strongly dislike fixing code from a fresh college graduate that only graduated because he copied the code from someone else or had someone write it for him purely so that he could graduate and have a degree in CS. ...
    (comp.lang.c)