import { Hashable } from './entry'; declare class HashTableSeparateChaining { private DEFAULT_CAPACITY; private table; private sz; private capacity; private maxLoadFactor; private threshold; constructor(capacity: number, maxLoadFactor: number); /***************************************************************************** INSPECTION *****************************************************************************/ /** * Returns the size of the hash table - O(1) * @return {number} */ size(): number; /** * Returns true if the hash table is empty, and false otherwise - O(1) * @return {boolean} */ isEmpty(): boolean; /** * Clears the hash table - O(1) * @return {void} */ clear(): void; /** * Returns true if the hash table contains the key, and false otherwise * @param {K} K * @return {boolean} */ containsKey(key: K): boolean; /** * Returns a list of the hash table's keys - O(n) * @return {Array} */ keys(): Array; /** * Returns a list of the hash table's values - O(n) * @return {Array} */ values(): Array; /***************************************************************************** MAIN ****************************************************************************/ /** * Returns value associated with key, and null if the key does not exist - O(1) amortized * @param {K} key * @return {V | null} */ get(key: K): V | null; /** * Adds the [K, V] pair to the hash table - O(1) amortized * @param {K} key * @param {V} value * @returns {V | null} */ set(key: K, value: V): V | null; /** * Deletes the entry with key K - O(1) amortized * @param {K} key * @returns {V | null} */ delete(key: K): V | null; /***************************************************************************** HELPERS ******************************************************************************/ private normalizeIndex; private bucketInsertEntry; private bucketDeleteEntry; private bucketSeekEntry; private resizeTable; } export default HashTableSeparateChaining; //# sourceMappingURL=hash-table-separate-chaining.d.ts.map