Search:

Type: Posts; User: TiredStudent

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,896

    Ok. Got it fixed! Thanks for pointing out the...

    Ok. Got it fixed! Thanks for pointing out the time name issue; I hadn't realized I did that. The problem was in my print statements. I was using %f or %lf think of printing it as a float, changing it...
  2. Replies
    3
    Views
    1,896

    clock_getime()

    Hi.

    I am working on a project for a multi-threaded prime number generator. All is working good except for one piece. I need to get the time for my program to generate my prime list. It is...
  3. Replies
    15
    Views
    4,162

    It did work fine! My problem was in my driver. I...

    It did work fine! My problem was in my driver. I was printing out the "found value" and its children. I had a check for NULL, but it was after those print statements, so it was trying to print...
  4. Replies
    15
    Views
    4,162

    Ok. It is definitely working now, as long as the...

    Ok. It is definitely working now, as long as the number is present. Still working on the case of it not being there. Yay for progress!
  5. Replies
    15
    Views
    4,162

    It is not working. It is again only checking the...

    It is not working. It is again only checking the left hand nodes. :-( If not in the left hand nodes it returns the last left hand node. *Sigh* What do you think? Is there an error in the way I...
  6. Replies
    15
    Views
    4,162

    IT WORKS!!!!!! Thank you! You are a lifesaver!...

    IT WORKS!!!!!! Thank you! You are a lifesaver! Just have to tweak it a bit, still getting a seg fault for a value not in the tree. X-D
  7. Replies
    15
    Views
    4,162

    It is not a binary search tree. That is what has...

    It is not a binary search tree. That is what has made it so frustrating. To find the value we essentially have to search the whole tree. Any example I find always assumes it is a BST. :-(
    Any other...
  8. Replies
    15
    Views
    4,162

    Could you please give me a suggestion on how to...

    Could you please give me a suggestion on how to fix it, or how the algorithm should be? I am at my wit's end with it. Just a suggestion, I am not asking you to fix the code for me. Thank you.
  9. Replies
    15
    Views
    4,162

    typedef struct node Node; typedef Node* NodePtr;...

    typedef struct node Node;
    typedef Node* NodePtr;
    typedef Node* Tree;
    struct node
    {
    int value;
    NodePtr Left;
    NodePtr Right;
    };
  10. Replies
    15
    Views
    4,162

    Pre Order Search on a general tree

    HI, I am supposed to use a pre order transversal to search for an inputted value. The function returns a pointer to the node it is found in. If it is not found it should return NULL (I think). My...
Results 1 to 10 of 10