yup exactly! I actually have to draw a heap after I call the function pop(). Im a bit confused with the question mostly, want me to write up the question, you might make more sense of it than me
ahochaude wrote:That sounds like something Loveless would say. He's the only other person I heard saying that here:
http://jdorama.com/viewtopic_1750_1215.htm
lovely wrote:u don't have to quote me i posted right on top of you... and yes if it is better to use the pm for those kind of remarks rather than filling a thread with it...
the PM is/was working fine.. it says "failed sending" but it still sends...
don't call me USAKO BTW.... ja
/)_/)
( ';' )
((")(") USAKO
:lol: :lol: I remember that bitch slapping.... :beaten: Is he Usako or Lovely now? :crazy:
yup exactly! I actually have to draw a heap after I call the function pop(). Im a bit confused with the question mostly, want me to write up the question, you might make more sense of it than me
Sure I'll try. But for pop() you just remove the root and replace it with the last element then bubble down right?
Sure I'll try. But for pop() you just remove the root and replace it with the last element then bubble down right?
Yea I think so. Cause like I have an array and I have to represent it with a heap. Well here is the prompt...
--------------------------------------
Trace the heapsort for a vector with elements {7,12,5,2,15,25,1}. Draw the initial heap, and show the status of the heap after every pop() operation. Also, show the contents of the vector at each step.
------------------------------------
the thing is, it doesn't specify a min or max heap so I'm a bit lost :crazy:
Yea I think so. Cause like I have an array and I have to represent it with a heap. Well here is the prompt...
--------------------------------------
Trace the heapsort for a vector with elements {7,12,5,2,15,25,1}. Draw the initial heap, and show the status of the heap after every pop() operation. Also, show the contents of the vector at each step.
------------------------------------
the thing is, it doesn't specify a min or max heap so I'm a bit lost :crazy:
Assume it's min heap. Max heap would be similar. First insert the elements into the heap.
[code:1]
Initial heap:
1
5 2
12 15 25 7
after 1st pop()
2
5 7
12 15 25
[1]
after 2nd pop()
5
12 7
25 15
[1,2]
after 3rd pop()
7
12 15
25
[1,2,5]
[/code:1]
I guess something like this.
ahochaude wrote:That sounds like something Loveless would say
eeeu gomen! lol :sweat: no im not trying to bite off of him honestly! it was just a random question
anyway ur avatar is funny, im suprised its not rina this time :mrgreen:
AHAHAH well you never know, might get hit with a moment of enlightment for such things :hehe: :hehe:
So Rina is on vacation right now? Man I just keep making Aya go to work everyday :hehe:
Yeah, Rina is on vacation for now.
And with my kind of brain, heh, there is never a moment of "enlightment".
Perhaps I should E-mail/PM Genma again regarding your account status just in case he deleted it unknowingly.....
Yeah, Rina is on vacation for now.
And with my kind of brain, heh, there is never a moment of "enlightment".
Perhaps I should E-mail/PM Genma again regarding your account status just in case he deleted it unknowingly.....
hahaha ok, his inbox must be litered with spam mail :hehe: :hehe:
Anyways I'm gonna hit the sack with Aya right now. Night buddy!
eltinator wrote:wow that was fast! thanks aho! :mrgreen:
Glad to see you on board again! :D
Now respond to that damn PM I gave you!
Mizzymurda, you've been reactivated as well. You can log in using your password. Don't change your E-mail again though! If it's not the one you want, let me know so I can have the admin change it for you.
Replying needs an account. Registration opens soon.