Пример #1
0
 /// <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));
 }
Пример #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))));
 }