# Lecture Notes for CS 112 - Intro to Computer Science II at University of San Francisco (USF)

## Notes Information

 Material Type: Class Note Professor: Staff Class: CS 112 - Intro to Computer Science II Subject: Computer Science University: University of San Francisco (CA) Term: Spring 2008 Keywords: On the RightOn the LeftBinary SearchImmediatelySpecial CaseManipulationImplementationImplementingOriginal ProblemOrdered List

## Sample Document Text

CS112-2008S-34 More Binary Search Trees 1 34-0: Binary Trees Binary Trees are Recursive Data Structures . Base Case: Empty Tree . Recursive Case: Node, consiting of: . Left Child (Tree) . Right Child (Tree) . Data 34-1: Binary Search Trees . Binary Trees . For each node n, (value stored at node n) ? (value stored in left subtree) . For each node n, (value stored at node n) < (value stored in right subtree) 34-2: Example Binary Search Trees 4 3 2 1 4 2 6 5 71 3 1 2 3 4 34-3: Binary Search Trees class BSTNode { private int data; private BSTNode left; private BSTNode right; public BSTNode(int data, BSTNode left, BSTNode right) { this.left = left; this.right = right; this.data = data; } public BSTNode left() { return left; } public BSTNode right() public int data() { { return right; return data; } } } 34-4: Binary Search Trees CS112-2008S-34 More Binary Search Trees 2 class BSTNode { ... public BSTNode left() public void setLeft(BSTNode newLeft) { { return left;...

## Related Documents

On the Left Notes
On the Right Notes
On the Left Notes
On the Left Notes
On the Left Notes
On the Left Notes
On the Left Exam
On the Left Notes
On the Right Exam
On the Left Quiz
On the Left Notes
On the Right Notes
On the Right Notes
On the Right Exam
On the Right Notes
On the Right Exam