Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Find the minimum key of the BST */
- public Key findMin() {
- return findMin(root).key; // 1
- }
- /* Private findMin() method */
- private Node<Key, Value> findMin(Node<Key, Value> x) {
- if (x.left == null) { // 2
- return x; // 2
- }
- return findMin(x.left); // 3
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement