is min heap different from max heap...?
can you please show me examples...?
cezarjont 0 Newbie Poster
Recommended Answers
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) …
Jump to Post>is there any difference between the construction of max heap and min heap??
The only difference is the ordering of your data. In a min heap, the smallest elements have priority, and in a max heap the largest elements have priority.
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.