You mean this? :)
struct heap {
int* elements;
size_t size;
size_t capacity;
};
Type: Posts; User: ma_ry
You mean this? :)
struct heap {
int* elements;
size_t size;
size_t capacity;
};
I was reading the website that you linked and I feel like it's impossible for me to do this. I was given lots of code but I only have to implement the few functions. The other functions, which were...
I am honestly not good enough to just write a minimal program with the same error.
You mean, you need more of the code? Probably even the whole code?
I know for sure that the problem is in my...
Hello again,
I am working on a heap program :)
The code will let the user insert numbers and then print them in order, starting with the largest number. In the end, the heap will be empty...
I am still learning and it is so hard for me! I only do this for like three months now so I still need to get used to pseudo codes. There may be something implied that is easy for other people to...
You are always so helpful! :)
I guessed that but I thought they would have said minimum instead so I wasn't sure. Do I see it right, that s/first doesn't get used at all?
Hello,
I got a pseudo code and there are a few things I don't quite understand :)
First of all, here is the code:
1 IterativeMergeSort (Array A, s, n)
2 step ← 1
Oh my god, that was perfect! I understood it finally, thank you so much!
My function finally works, I am so happy! :)
Okay, so if that is wrong then I deleted it and compiled again after I added before the while loop:
if(bst->root == NULL)
{
return;
}
If I get NULL as an argument then I don't want to...
Hi, thanks for the answer! :)
I changed my tmp to this:
bst_node* tmp = malloc(sizeof(bst_node));
tmp = bst->root;
tmp->phone = phone;
tmp->name = name;
...
Hello :)
I have to write a C-code for a binary search tree.
It will read from a textfile and create with it a tree. When I execute the file I should have all data from the file in the tree and...