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 12:16 ID:JBINkuZK

>>12
>>13
no, NP complete means that its unsolveable. GIven an NP complete problem its not intractable to any solvable problem, therefore its unsolveable.
Go read wikipedia if you are confused.

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