Hello,

I am supposed to implement heapsort proposed by floyd. I got it as a home work. I know the simple implementation of heapsort. but what i am supposed to do is- while sorting, instead of comparing 3 values (parent and two childs), i need to compare only 2 child in the heapify procedure. can anybody help me with the algorithm?

Thank you,
Drew.

School work? Please don't ask us to do it for you! There are a lot of resources to research this on the web. Remember, Google is your friend! I did a quick search, and found the answer to your question in about 5 seconds...

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.