Return to the Lecture Notes Index

15-111 Lecture 20 (Thursday, June 17, 2004)

In class you did and turned in the following two methods:


/*
 * Biggest subtree (has most nodes)
 * return negative if right subtree is bigger
 * return 0 if two subtrees are equal
 * return positive if left subtree is bigger
 */
public int biggerSubtree();

/*
 * Sparse factor
 * return ratio of leaves to internal nodes (including the root)
 */
public double sparseFactor();