import LinkedList from "./LinkedList"; class Queue { private readonly _linkedList: LinkedList; constructor(source?: Iterable) { this._linkedList = new LinkedList(source); } enqueue(value: T): number { return this._linkedList.push(value); } dequeue(): T | undefined { return this._linkedList.shift(); } get length(): number { return this._linkedList.length; } isEmpty(): boolean { return this._linkedList.length === 0; } } export default Queue;