@Test public void testMin() { assertNull("Empty tree min was not null", tree.min()); tree.add(20, "LD"); assertEquals("One element tree min wrong", (Integer) 20, tree.min()); tree.add(30, "df"); tree.add(15, "kjd"); tree.add(10, "kjdf"); tree.add(5, "kdjf"); tree.add(1, "esd"); assertEquals("Multi-element tree min wrong", (Integer) 1, tree.min()); }
@Override public K min() { opsCount++; if (root==null){ return null; } else { return min(root,root.key); } }
AVLTreeImpl implements IAVLBinaryTree<K, V> { @Override public K min() { opsCount++; if (root==null){ return null; } else { return min(root,root.key); } } }
AVLTreeImpl implements IAVLBinaryTree<K, V> { @Override public K min() { opsCount++; if (root==null){ return null; } else { return min(root,root.key); } } AVLTreeImpl(boolean rotate); }
AVLTreeImpl implements IAVLBinaryTree<K, V> { @Override public K min() { opsCount++; if (root==null){ return null; } else { return min(root,root.key); } } AVLTreeImpl(boolean rotate); void resetOpsCount(); int getOpsCount(); @Override boolean isEmpty(); @Override int size(); @Override void add(K key, V data); @Override boolean remove(K key); @Override K min(); @Override K max(); @Override int height(); @Override K root(); @Override BSTNode<K,V> getRootNode(); @Override V find(K key); @Override List<K> preorderTraversal(); @Override List<K> postorderTraversal(); @Override List<K> inorderTraversal(); @Override List<K> levelorderTraversal(); static void main(String[] args); }
AVLTreeImpl implements IAVLBinaryTree<K, V> { @Override public K min() { opsCount++; if (root==null){ return null; } else { return min(root,root.key); } } AVLTreeImpl(boolean rotate); void resetOpsCount(); int getOpsCount(); @Override boolean isEmpty(); @Override int size(); @Override void add(K key, V data); @Override boolean remove(K key); @Override K min(); @Override K max(); @Override int height(); @Override K root(); @Override BSTNode<K,V> getRootNode(); @Override V find(K key); @Override List<K> preorderTraversal(); @Override List<K> postorderTraversal(); @Override List<K> inorderTraversal(); @Override List<K> levelorderTraversal(); static void main(String[] args);  }