UNPKG

queuejs-bfs

Version:

A package to offer a built-in Queue data structure and Breadth First Search (BFS) method for traversing a graph for JavaScript applications.

13 lines (12 loc) 337 B
declare class Queue { items: any[]; constructor(); enqueue(element: any): void; dequeue(): any; peek(): any; isEmpty(): boolean; size(): number; print(): void; } declare const bfs: (graph: object, callback: Function, nodeAndNeighbor?: boolean, startNode?: string | number) => void; export { Queue, bfs };