Skip to content

Instantly share code, notes, and snippets.

@kleinron
Created November 13, 2021 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kleinron/fdeedb03d75bc9a25992bf3518bb220c to your computer and use it in GitHub Desktop.
Save kleinron/fdeedb03d75bc9a25992bf3518bb220c to your computer and use it in GitHub Desktop.
queue interface
interface Queue extends Iterable<any>{
enqueue(item: any): void;
dequeue(): any;
clear(): void;
size(): number;
peekFirst(): any;
peekLast(): any;
copyTo(arr: any[], startIndex?: number): void
drainingIterator(): Iterator<any>;
toJSON(): any[];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment