typescript-algorithms-and-datastructures
Version:
Useful algorithms and Data structures written in typescript.
17 lines (16 loc) • 450 B
TypeScript
import { ITypedArray } from './ITypedArray';
export declare class TypedStack {
protected stack: ITypedArray;
protected top: number;
protected max: number;
constructor(TypedArray: {
new (size: number): ITypedArray;
}, size: number);
clear(): void;
isEmpty(): boolean;
search(element: number): number;
peek(): number;
pop(): number;
push(element: number): this;
size(): number;
}