Exemple #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);
Exemple #2
0
        public V Get(K key)
        {
            BSTMapNode <K, V> node = GetNode(root, key);

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