is min heap different from max heap...?
can you please show me examples...?
cezarjont
0
Newbie Poster
Recommended Answers
Jump to Postis min heap different from max heap...?
Yes. :) A min heap uses ascending priority where the smallest item is the first to be popped from the heap. A max heap uses descending priority where the largest item is the first to be popped. You can read more about heaps …
Jump to Postthnx... but i can't really understand it... i only know turbo c... not c++...
But I don't wanna write a heap in C just for an example. :cry: Okay okay, here is a simple example in C for a max heap. :)
#include <stdlib.h> #define CHILD(node) ((node) …
All 7 Replies
Ravalon
62
Posting Whiz in Training
cezarjont
0
Newbie Poster
Ravalon
62
Posting Whiz in Training
~s.o.s~
commented:
Are you always this helpful and descriptive? :D - ~s.o.s~
+12
srujana.k
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
sandy423
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.