Search:

Type: Posts; User: Leojeen

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    2,083

    yeah, I fixed that earlier. About the len...

    yeah, I fixed that earlier.
    About the len variable, I need to know the size of the array so that I print the correct string. I did a check and it turns out len is always 1. How do I get the size of...
  2. Replies
    5
    Views
    2,083

    Haha, no it doesn't. I don't how it ended up...

    Haha, no it doesn't. I don't how it ended up there.
  3. Replies
    5
    Views
    2,083

    Unable to create thread

    Hello!
    I'm supposed to write a program forks 3 processes (4 in total, including the father). and then have each process fork three threads and two additional process. These two additional processes...
  4. Replies
    31
    Views
    3,677

    Ok, it works now after I cast the sqrt in the...

    Ok, it works now after I cast the sqrt in the printf to int.
  5. Replies
    31
    Views
    3,677

    Yes, I saw that. We focused on developing the...

    Yes, I saw that. We focused on developing the equation of house versus max in earlier posts, I thought EVOEx was talking about the that temp variable. I didn't consider the last part of the code....
  6. Replies
    31
    Views
    3,677

    Ok, I appreciate your help. I don't think...

    Ok, I appreciate your help. I don't think repeating the same exact answer is that encouraging but I'll keep working on it. Maybe others will join.
    I used unsigned long long everywhere. I don't see...
  7. Replies
    31
    Views
    3,677

    Yes, my mistake. #include ...

    Yes, my mistake.


    #include <stdlib.h>
    #include <stdio.h>
    #include <math.h>
    #include <stdint.h>
    int isPerfectSquare(unsigned long long );
    int main(int argc, char* argv[]){
    int...
  8. Replies
    31
    Views
    3,677

    Ok, after doing some math, I made it efficient a...

    Ok, after doing some math, I made it efficient a little bit in terms of time. But still, the program fails to give me right answers after the 6th line. I think the unsigned long long is not enough. ...
  9. Replies
    31
    Views
    3,677

    Anyone?

    Anyone?
  10. Replies
    31
    Views
    3,677

    I have two loops because I need to keep track of...

    I have two loops because I need to keep track of how many lines to print, otherwise the program will crash.
    Your formula doesn't reduce the number of loops in this case. It simplifies the...
  11. Replies
    31
    Views
    3,677

    Yes, I copied it right from my Dev C++ opened...

    Yes, I copied it right from my Dev C++ opened file. Can you give me some hints of your mathematical work so I can do some research later on?

    You mean something like this!


    #include <stdlib.h>...
  12. Replies
    31
    Views
    3,677

    Ok. This is giving me a headache. I used long...

    Ok. This is giving me a headache. I used long long everywhere when I deemed necessary.
    Now I get 0s for the max value. Very strange.


    #include <stdlib.h>
    #include <stdio.h>
    int main(int argc,...
  13. Replies
    31
    Views
    3,677

    Yes, thank you. Such a solution is lovely, but...

    Yes, thank you.
    Such a solution is lovely, but I'm just trying to solve the problem for my self. So it's really important for me to know what went wrong in my code. Later on, I'll think on doing...
  14. Replies
    31
    Views
    3,677

    I tried what you said tabstop. Still, no output...

    I tried what you said tabstop. Still, no output after the 6th line. I undersand the problem with int, but long long didn't fix it.
  15. Replies
    31
    Views
    3,677

    Ok. I did as told. I changed temp type to long...

    Ok. I did as told. I changed temp type to long long but I still get the same output as above!


    #include <stdlib.h>
    #include <stdio.h>
    int main(int argc, char* argv[]){
    long long...
  16. Replies
    31
    Views
    3,677

    Already tried. The problem still takes a long...

    Already tried. The problem still takes a long time to execute the 6th line of input. I've waited a little bit, and it gave me strange results:
    6 8
    35 49
    204 288
    1189 1681
    6930 ...
  17. Replies
    31
    Views
    3,677

    Help with implementing an algorithm!

    Hello there!
    The following is an implementation of the street numbers problem.
    My output stops at the fifth line! probably because of bad memory management or the size of the integers. I tried...
  18. Replies
    40
    Views
    5,368

    Nahla right? You read many books you said, and...

    Nahla right?
    You read many books you said, and yet you can't program a typical data structure in C, I just finished my data structures course as well, and I'm sure linked list implementation is...
  19. Replies
    6
    Views
    19,299

    Seems like you're trying to implement a Fibonacci...

    Seems like you're trying to implement a Fibonacci sequence!
    Anyway, that does "i+2" mean? If you want to increment i by 2 the way to do it is

    i = i + 2
  20. Thread: Heaps!

    by Leojeen
    Replies
    18
    Views
    3,594

    I just realized that the function that adds...

    I just realized that the function that adds numbers to the tree does not actually preserve the complete tree property! I really thought it was working!
    It works for the first level (zero being the...
  21. Thread: Heaps!

    by Leojeen
    Replies
    18
    Views
    3,594

    Just a sidenote! in the add function should be...

    Just a sidenote!
    in the add function should be like this:


    void add(int x, node** root){
    node* new_node = (node*) malloc(sizeof(node));
    ...
  22. Thread: Heaps!

    by Leojeen
    Replies
    18
    Views
    3,594

    Ok, no problem!! I will just go with adding a...

    Ok, no problem!! I will just go with adding a level! it may work! who knows!?
  23. Thread: Heaps!

    by Leojeen
    Replies
    18
    Views
    3,594

    Rebalanced tree? Nothing will change when you...

    Rebalanced tree? Nothing will change when you heapify a tree but the values, it is just a matter of swapping nothing else, I mean I should not add any pointer!
    Or so I thought! :):)
  24. Thread: Heaps!

    by Leojeen
    Replies
    18
    Views
    3,594

    You mean like, adding an int to the structure...

    You mean like, adding an int to the structure where I store the level?
  25. Thread: Heaps!

    by Leojeen
    Replies
    18
    Views
    3,594

    What the hell di I wrote? it is "in the sense"...

    What the hell di I wrote? it is "in the sense" not "in the sun", I just finished reading "Men in the sun"..that explains it! :)
Results 1 to 25 of 103
Page 1 of 5 1 2 3 4