@gabrielrufino/cube
Version:
Data structures made in Typescript
20 lines (19 loc) • 880 B
TypeScript
import type IHashTableLinearProbing from './IHashTableLinearProbing';
import type IHashTableLinearProbingInputs from './IHashTableLinearProbingInputs';
import type IHashTableLinearProbingOptions from './IHashTableLinearProbingOptions';
import HashTableLinearProbingElement from './HashTableLinearProbingElement';
export default class HashTableLinearProbing<T = number> implements IHashTableLinearProbing<T> {
private readonly _maxSize;
private _data;
constructor(inputs?: Readonly<IHashTableLinearProbingInputs<T>>, { maxSize }?: IHashTableLinearProbingOptions);
get data(): {
[index: number]: HashTableLinearProbingElement<T>;
};
get size(): number;
put(key: string, value: T): T | null;
get(key: string): T | null;
remove(key: string): T | null;
private _hashCode;
private _nextPositionOf;
private [Symbol.toPrimitive];
}