Help on how to downheap in data structures and algorithms Programming Software Development by dan.gerald …, moving the lastnode to the new root and applying the downheap. Here is my code snippet #include <iostream> #include…); //remove root //move the lastnode to the new root //apply downheap Re: Help on how to downheap in data structures and algorithms Programming Software Development by buterous write am algorthn to add number until you pick the number zero Re: Help on how to downheap in data structures and algorithms Programming Software Development by buterous write an algorithom to add number until you pick the number zero heap creation c++ Programming Software Development by tones1986 … / 2 - 1]); } } template<class T,class U> void downheap(vector<T>&, int, U); template<class… Re: heap creation c++ Programming Software Development by tones1986 … - 1]); } [/B] } template<class T,class U> void downheap(vector<T>&, int, U); template<class… Re: heap creation c++ Programming Software Development by Narue >when i attempt to swap etc, it doesnt work and i get a crash Step through your code and see what the indices are just before you crash. By the look of things, you're trying to use a negative index, which suggests your math is off. Keep in mind that a lot of heap algorithms are 1-based, and C++ is 0-based. This can cause off-by-one errors if you… Re: heap creation c++ Programming Software Development by tones1986 I no longer get 0's in my code - i changed my size to be size - 1 , and that fixed that problem. I do though ... get a rather large random number in my code ... but any help in sortnig out my upHeap() function so that i will proberly go through my vector and create a heap, i would much appreicate it.. i will update you with any info as i work more