/// <summary>
 /// Does this hash table contains the given value.
 /// Time complexity: O(log(n)).
 /// </summary>
 /// <param name="value">The value to check.</param>
 /// <returns>True if this hashset contains the given value.</returns>
 public bool Contains(T value)
 {
     return(binarySearchTree.HasItem(value));
 }
Beispiel #2
0
 /// <summary>
 /// Does this dictionary contains the given key.
 /// Time complexity: O(log(n)).
 /// </summary>
 /// <param name="key">The key to check.</param>
 /// <returns>True if this dictionary contains the given key.</returns>
 public bool ContainsKey(K key)
 {
     return(binarySearchTree.HasItem(new SortedDictionaryNode <K, V>(key, default(V))));
 }