src/structureUtil.js
// Peek at the top of the priority queue

Peek at the top of the priority queue
Peek at the top of the priority queue
peek() {
        if (this.isEmpty()) {
            return "Priority Queue is empty. Unable to peek.";
        }
        return this.list[0];
    }
peek ( ) { if ( this . isEmpty ( ) ) { return "Priority Queue is empty. Unable to peek." ; } return this . list [ 0 ] ; }
Peek at the top of the priority queue
Peek at the top of the priority queue