View Single Post
  #10 (permalink)  
Old 08-05-2007, 03:28 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,118
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Thanx a lot Bench
I'm now working on the remove() implementation for BinarySearchTrees, it's weird that I can't set anything unless if I'm using this.root directly instead of referenced it to n. I can see why, but if I update the value based on the this.root, it will remove the root right away I'm looking on solution into remove() implementation

I tested this doesn't work:

PHP Code:
    public void remove() {
        
BinaryNode n this.root;
        
null;
    } 
However, this one works:

PHP Code:
    public void remove() {
        
this.root null;
    } 
sigh.. I need some idea to get the updated root

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by HelloWorld : 08-05-2007 at 03:31 PM.
Reply With Quote