// 平均时间复杂度O(logn) publicclassBSTMap<KextendsComparable<K>, V> implementsMap<K, V> { privateclassNode{ public K key; public V value; public Node left, right;
publicNode(K key, V value){ this.key = key; this.value = value; left = null; right = null; } }