예제 #1
0
        public V Remove(K key)
        {
            BSTMapNode <K, V> node = GetNode(root, key);

            if (node is not null)
            {
                root = Remove(root, key);
                return(node.Value);
            }
            return(default);
예제 #2
0
        public V Get(K key)
        {
            BSTMapNode <K, V> node = GetNode(root, key);

            return(node is null ? default : node.Value);
        }
예제 #3
0
 public void Add(K key, V value)
 {
     root = Add(root, key, value);
 }