3 ms·
var queue = []; queue.add = queue.push; queue.remove = queue.shift; Oh god no! I pray I don't ever have to work with this guy after he learns about pro
by WilliamLP 16y ago
var queue = [];
queue.add = queue.push;
queue.remove = queue.shift;
Oh god no! I pray I don't ever have to work with this guy after he learns about prototypes.
Also, he is using "shift" and requires binary trees, but makes no mention whatsoever of the performance characteristics?