Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java Parameters and Inheritance question

Name: Javafag 2007-06-07 15:06 ID:8FwQmpEe

Building a Red-Black Tree for a project. Right now I've got a working Binary Search Tree with constructors:

public class BSTree <T extends Comparable>{
    private BSTNode<T> root;
   
    public BSTree(){
    }
    public BSTree(BSTNode<T> n){
        root=n;
    }
    public BSTree(T c){
        root=new BSTNode<T>(c);
    }

And then I've got the Red-Black Tree's constructors:

public class RBTree <T extends Comparable> extends BSTree{
   
    public RBTree (){
        super();
    }
    public RBTree (T c){
        super(c);
    }
    public RBTree (BSTNode<T> n){
        super(n);
    }

My question: Will this handle Parameters correctly? Ex, if I make a RBTree<Integer>(), will it run BSTree<Integer>(), or just BSTree() ?

Sorry for Java faggotry, it's the only language my school teaches.

Name: Anonymous 2007-06-09 6:45 ID:HG2DFXiU

>>6
NP-complete means the problem grows exponentially with respect to the input, so it quickly becomes intractable.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List