algorithms added for ch6/priority_queue.h