C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
help in heap ! Posted by frozenparata on 31 Mar 2006 at 10:49 PM
Hi guyz,
we know tht heap is a specialized tree-based data structure.I wish to know the answer for this qn.Let A and B be the nodes of a heap such tht B is a child of A.Heap must then satisfy the following condition.(heap property) key(A)>=key(B)

a)How many different heaps are there containing the three keys 1,2 & 3?

b)which positions cud be occupied by the 3rd largest key in a heap with 32 keys ?(where the root is counted as depth 0)

c)which positions cud be occupied by the 3rd smallest key in the heap with 32 keys??

plz help me in answering this by explanation.
Thread Tree
frozenparata help in heap ! on 31 Mar 2006 at 10:49 PM
tsagld Re: help in heap ! on 4 Apr 2006 at 7:37 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.