Binary Tree Traversal Practice Quiz
Practice Problem
Take out a piece of paper and put your name on the upper right corner.
Write the find(E target) method for a BinarySearchTree.
public class BinarySearchTree<E> {
private BinaryNode<E> root;
private Comparator<E> comp;
public E find(E item) {
// your code
}
private class BinaryNode<E> {
private E data;
private BinaryNode<E> left;
private BinaryNode<E> right;
}
}
Time Remaining:
You can restart the timer by reloading the page.
Try to complete the problem in 15 minutes.
If you cannot complete the program in 15 minutes, you can watch me solve the problem in a text editor.