在创建bst类

时间:2015-10-10 23:37:01

标签: java

如果我创建了bst类,如何使用二叉搜索树实现字典?

public class BinarySearchTree<E> extends Comparable<E>> implements Iterable<E>{
   //bst methods(add, remove, find), node class, inOrderIterator, 
}


public class BSTDic<K extends Comparable<K>, V> {
   //how would i start it off or would i need to instantiate a bst data? 
   //additionally i need methods such as add(K key, V value), how would  i approach those
}

我们非常感谢任何建议,我只需要一个起点帮助。

0 个答案:

没有答案