Search:

Type: Posts; User: javapenguin

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    2,925

    Re: Need help fixing Binary Search Tree code

    if(s.compareTo(n.data) < 0){
    n.left = insert2(s, n.left);
    }else if(s.compareTo(n.data) > 0){
    n.right = insert2(s, n.right);
    }

    return n;
    }
  2. Replies
    6
    Views
    2,925

    Re: Need help fixing Binary Search Tree code

    What's in the tree? If Strings, you could always use .equals.
Results 1 to 2 of 2