Search:

Type: Posts; User: nfrandsen

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,521

    Oh ok, yeh with another pointer to the parent i...

    Oh ok, yeh with another pointer to the parent i can see how it can be done, but for some reason i cant quite get it right. I get a segmentation error when i try to disconnect the successor node. Can...
  2. Replies
    3
    Views
    1,521

    removing node

    i am having a little trouble removing a node with two children from a binary search tree. my algorithms kinda working in that i find a bottom left successor and swap they keys with the node im...
  3. Replies
    4
    Views
    1,773

    Thanks for the help, the new code seems to work....

    Thanks for the help, the new code seems to work.



    bst bst_insert(bst b, char *s){
    if( b == NULL ){
    bst result = emalloc(sizeof * result);
    result->key = emalloc((strlen(s) + 1)...
  4. Replies
    4
    Views
    1,773

    how else can it be done? in the main method...

    how else can it be done?
    in the main method insert is simply called as b = bst_insert(b, "foo");
    if i do it like that inside the insert method the tree could never grow bigger than one node, so...
  5. Replies
    4
    Views
    1,773

    problem inserting into recursive BST

    hey guys,
    Im new to C and having a bit of problems inserting into a recursively defined BST. it seems to work ok inserting 3 or 4 items but any more than that and it starts to make duplicates and do...
Results 1 to 5 of 5