Various priority queues implemented in JavaScript