July 2018
Beginner
202 pages
5h 4m
English
The aim is to implement a method in Java to search for the minimum key in a binary tree.
Perform the following steps:
public Optional<K> minKey()
public Optional<K> minKey() { return Optional.ofNullable(root).map(this::minKey);}private K minKey(BinaryTreeNode<K, V> node) { return node.getLeft().map(this::minKey).orElse(node.getKey()); ...Read now
Unlock full access