Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
heap
- Page 1
heap
Programming
Software Development
14 Years Ago
by sidra 100
…to first enter data in array then making a min
heap
out of it [CODE]#include <iostream> #…include <stdlib> using namespace std; class
Heap
{ int currentsize; int *array; int capacity; void heapsort(int… the number of element u want to sort in
heap
:"; cin>>n; cout<<…
HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
… an array as they are pulled off the
Heap
. The
Heap
ADT is implemented using a class. ------------------------------------------------------------------------------*/ #include…time(NULL)); // Seeds the random number generator
Heap
<int>
heap
; // The
Heap
object int newNumber; int array[MAX_SIZE]; // …
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
….cpp:<.text+0xae>: undefined reference to '
Heap
<int>::
Heap
()' tmp/ccegi5Id.o:main.cpp:<.text+0xae>….o:main.cpp:<.text+0xae>: undefined reference to '
Heap
<int>::display() const' tmp/ccegi5Id.o:main.cpp…:<.text+0xae>: undefined reference to '
Heap
<int>::removeMax()' collec2: ld returned 1 exit status…
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
…; at the very end of my display: [B]THE RAW
HEAP
: =============================== 190 173 183 162 81 180 163 158 100 47… 0 Segmentation fault <core dumped> [/B] 'THE RAWP
HEAP
:' section of the program appears to be correct. It generates…
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
… outputting incorrect results. Here is the display: [B]THE RAW
HEAP
: ========================= 197 158 191 143 151 135 179 36 116 73…
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
…. Here is the output of one run: [B]THE RAW
HEAP
: =========================== 196 192 192 180 182 179 188 115 139 127…
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
… command for main.cpp, I ran into this warning: [B]
Heap
.h:203: warning: control reaches end of non-void function…
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
…lt; MAX_SIZE; i++) { array[i] =
heap
.removeMax(); // Fills array element i with the //… freshly removed maximum value // from the
Heap
cout << array[i] <&…
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by mitrmkar
[QUOTE=Toxic_Rice]But I'm a little confused. I thought I did that with the 'SORTED ARRAY:' section ...[/QUOTE] Yes, you did [I]that[/I] correctly, however, I was suggesting that you might be stepping out of boundaries wrt. the
heap
's [ICODE]myArray[][/ICODE]
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by Toxic_Rice
…(NULL)); // Seeds the random number generator
Heap
<int>
heap
; // The
Heap
object int newNumber; int array[MAX_SIZE-1];… // The array to store the
Heap
-sorted integers **** This is what I changed. …have the output as well: [B]THE RAW
HEAP
: ========================= 197 173 184 149 171 181 167…
Re: HEAP Program Help
Programming
Software Development
14 Years Ago
by mitrmkar
… the random number generator
Heap
<int>
heap
; // The
Heap
object while(!
heap
.isFull()) {
heap
.insert(rand() % 190 + 10); }
heap
.display(); while(!
heap
.isEmpty()) { cout <…
Heap Sort Running Way Too Slowly
Programming
Software Development
15 Years Ago
by OnTheRadio
…* Insertion Sort * Merge Sort * Quick Sort *
Heap
Sort The sorted result should be written to the output… such that all nodes below the start index are in
heap
order */ siftDown (v, start, count - 1); start =… after sifting down the root all nodes/elements are in
heap
order } // siftDown() template <typename T>…
heap function
Programming
Software Development
12 Years Ago
by marnun
… > The function returns true if the
HEAP
property holds among the array elements x[i]...… isHeap (int x[], int n, int i) { bool
heap
=true; for (int j=i; j<n; j…x[j]>=x[2*j+2])
heap
=true; else
heap
=false; } else
heap
=true; return
heap
; } } CodeLab returns logical error: …
Re: heap function
Programming
Software Development
12 Years Ago
by nullptr
… elements x[i]...x[n-1] , and false otherwise. The
HEAP
property is simply that for every value of j between… has no children, then there's nothing to cause a
HEAP
property failure. For code efficiency, there's no reason to… child unless x[j] has a first child and the
HEAP
property holds true for the first child. So with that…
heap short and heap tree about help me pls
Programming
Software Development
10 Years Ago
by webwebcpp
…is called ’ countries’. The cities will be added to the
Heap
Tree according to the countries they are bounded. Binary search…tree which is suitable for the application. You can form
Heap
tree by using series. After the names of the …cities are read and stored in binary search tree and
Heap
tree, inorder under the binary search tree must be …
Heap corruption detected. What does it mean?
Programming
Software Development
16 Years Ago
by franziss
… mean? Thank you for your help
Heap
corruption detected at 0072FB10
HEAP
[algo.exe]:
HEAP
: Free
Heap
block 72fb08 modified at 72fb1c after it….exe. This may be due to a corruption of the
heap
, and indicates a bug in algo.exe or any of…
Re: Heap Data Structure - Removing an arbitrary item
Programming
Computer Science
13 Years Ago
by blackrobe
… it would mean by "its index" if the
heap
is stored using an old fashioned tree with nodes and… the location of the element in the
heap
. The remaining elements must form a valid
heap
once you have executed your algorithm… its placed at the very top, at which point the
heap
operation Extract-Min pops the element and restructures the…
Re: Heap Sort
Programming
Software Development
13 Years Ago
by DavidKroukamp
… code before resorting to dissecting an already written
heap
sort algorithm. Any information you could give to…[url=http://www.roseindia.net/java/beginners/arrayexamples/heapSort.shtml]
Heap
Sort in Java[/url] , [url=http://www.augustana.…[url=http://www.java-forums.org/algorithms/7606-
heap
-sort-java.html]
Heap
Sort in Java[/url] , [url=http://www…
heap creation c++
Programming
Software Development
16 Years Ago
by tones1986
… a function, upHeap() that should then recreate the
heap
structure as required. Then the next item is read…lt;int> v1(1); //
heap
of integers vector<float> v2(1); //
heap
of floating-pt nums vector<…;string> v3(1); //
heap
of strings // print header message cout << …
Heap Data Structure
Programming
Software Development
16 Years Ago
by TuX4020
…structure. I've read lots of pages online about the
heap
data structure, but I keep coming up with questions. …In my class, I got the impression that a
heap
was structured similarly to a tree - parent node/child … it appears that the method of choice is fashioning a
heap
based on an underlying array - which way is generally …
Heap Overflow in Pascal
Programming
Software Development
16 Years Ago
by solaris249
[B]Is pascal vulnarable to
heap
overflow vulnarability?I think pascal doesn't any have problem with stack overflow attack.is it true in
heap
overflow attack too?does pascal any problem with
heap
overflow attack? Thanks.[/B]
heap sort -- segmentation fault
Programming
Software Development
15 Years Ago
by klackey19
…and header but I am only concerned with the
heap
sort file) [CODE]//header file #ifndef SRT_H …srtbubb(a, size, sizeof(TYPE), compare); #elif defined
HEAP
srtheap(a, size, sizeof(TYPE), compare); #elif …gt; *(TYPE *)p2) { return +5; } return 0; } //
heap
sort file #include <stdlib.h> #include <string…
Heap Sort
Programming
Software Development
13 Years Ago
by WigglesMcMuffin
Hello, This isn't the typical "I wrote a
heap
sort that doesn't work, help me please" thread, … really like to [B]understand[/B] the innards of a
heap
sort before I attempt to write one. I'd like… basic pseudo code before resorting to dissecting an already written
heap
sort algorithm. Any information you could give to gently clear…
heap sort
Programming
Software Development
13 Years Ago
by jigglymig
…point me in the right direction. [CODE]void
Heap
::heapRebuild(int root) { // if the root…[child] = temp; // transform the new subtree into a
heap
heapRebuild(child); } // end if } // end if //… do nothing } // end heapRebuild[/CODE] [CODE]void
Heap
::heapSort() { int temp; int last = size-1;…
Heap Sort Stack Over Flow At 100,000 Random Elements
Programming
Software Development
12 Years Ago
by fonzi
…from 100-10,000 random elements after that the
heap
sort says stack over flow, im thinking the… MAX_HEAPIFY(A, largest, n); } } //this method builds a max
heap
takes in an array and a int n public static…MAX_HEAPIFY(A, i, n); } } //this method is the
heap
sort it takes in one array and a lenght public…
Heap Tree - Array
Programming
Software Development
12 Years Ago
by R1111
**Hello, If I have an array, and want to make a
heap
tree out of it using make
heap
and sort
heap
, how would I do it? I'm struggling because I didn't take any course in data structure. Any help -in c++- will be appreciated :D**
Re: heap creation c++
Programming
Software Development
16 Years Ago
by Narue
… math is off. Keep in mind that a lot of
heap
algorithms are 1-based, and C++ is 0-based. This…
Re: heap creation c++
Programming
Software Development
16 Years Ago
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
Re: Heap corruption problem in getsrtring() of resultset occi methods in vs 2005
Programming
Software Development
16 Years Ago
by dhpatil1
Hi all I have a
heap
corruption problem in getting STL containers data through OCCI methods …gt;getString(1); r.PDM_FIRST_NAME=rs->getString(2);; //Error
Heap
Corruption r.PDM_LAST_NAME= rs->getString(3); r.PDM_F_FIRST_NAME= … vs 2005. 12 thousand records are fatched and then
Heap
corruption problem message dispaly and exit from program.
Re: heap sort
Programming
Software Development
16 Years Ago
by csurfer
…want to know how to write a c program for
heap
sort. please help me[/QUOTE] Do you know …how to sort numbers according to
Heap
Sort manually on paper ? I hope your answer is… through these first: 1>How to construct a
heap
tree? 2>What number should be deleted or … the process of removal and how is the
heap
affected?
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC