Package algs13
Class XBTree
java.lang.Object
algs13.XBTree
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static int
static boolean
(package private) XBTree.BNode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic XBTree
demoTree()
int
depth()
int
static XBTree
int
height()
int
static void
private static XBTree.BNode
static XBTree
randomTree
(double chanceOfNull, int maxDepth) private static XBTree.BNode
randomTreeHelper
(double chanceOfNull, int maxDepth, int depth) private static void
testDepthOfShallowestFive
(XBTree tree, int expected) private static void
testHeightOfShortestFive
(XBTree tree, int expected) void
toGraphviz
(String filename) private static void
toGraphviz
(GraphvizBuilder gb, XBTree.BNode parent, XBTree.BNode n) toString()
private static void
toString
(StringBuilder sb, XBTree.BNode n)
-
Field Details
-
root
-
count
-
DEBUG
-
-
Constructor Details
-
XBTree
public XBTree()
-
-
Method Details