JavaScriptTools
A library provides JavaScript algorithm functions for all uses
- Priority Queue
- coming soon...
Priority Queue Example
let isMinHeapTree = true;let q = isMinHeapTree; // true => min heap tree, false => max heap tree q; // => [ null, 5 ]q; // => [ null, 5, 3 ]q; // => [ null, 8, 3, 5 ];q; // => [ null, 8, 3, 5, 1 ] q; // Pop: 8 => [ null, 5, 3, 1 ]q; // Pop: 5 => [ null, 3, 1 ]q; // Pop: 3 => [ null, 1 ]q; // Pop: 1 => [ null ]q; // Pop: null => [ null ]