Difference between revisions of "CSC352 Red-Black Trees in Java"

From dftwiki3
Jump to: navigation, search
(Created page with "--~~~~ ---- <source lang="java"> /************************************************************************* * Compilation: javac RedBlackTree.java * Execution: java Re...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 20:02, 25 September 2013 (EDT)
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 20:02, 25 September 2013 (EDT)
 
----
 
----
 +
 +
The original file can be found [http://algs4.cs.princeton.edu/33balanced/RedBlackBST.java.html here].
 +
 +
 +
<onlysmith>
 
<source lang="java">
 
<source lang="java">
 
/*************************************************************************
 
/*************************************************************************
Line 27: Line 32:
 
  *
 
  *
 
  *  http://algs4.cs.princeton.edu/33balanced/RedBlackBST.java.html
 
  *  http://algs4.cs.princeton.edu/33balanced/RedBlackBST.java.html
 +
*  Original Copyright © 2002–2010, Robert Sedgewick and Kevin Wayne.
 +
*  Last updated: Sat Sep 14 10:29:29 EDT 2013.
 +
*  Modified 2013 D. Thiebaut
 
  *************************************************************************/
 
  *************************************************************************/
  
Line 37: Line 45:
 
protected static final boolean BLACK = false;
 
protected static final boolean BLACK = false;
  
protected Node root; // root of the BST
+
protected Node root = null; // root of the BST
  
 
// BST helper node data type
 
// BST helper node data type
Line 815: Line 823:
 
}
 
}
  
</source>
+
 
 +
</onlysmith>
 
<br />
 
<br />
 
<br />
 
<br />

Latest revision as of 11:00, 1 October 2013

--D. Thiebaut (talk) 20:02, 25 September 2013 (EDT)


The original file can be found here.



This section is only visible to computers located at Smith College