Data Structure Converting Heap | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Data Structure Converting Heap

I have to re-write this code by multiplying vector by (-1) using Max Heap.Can Someone help me? https://code.sololearn.com/cN2j5hch3e42/?ref=app

9th May 2020, 9:39 AM
Kristo Kallfa
Kristo Kallfa - avatar
1 Answer
0
If I understand you correctly, you want to reverse the order to have maximum values on top? Use less<int> instead of greater<int>.
9th May 2020, 11:05 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar