Removing elements from Priority Queue

 

import java.util.Iterator;
import java.util.PriorityQueue;

class PriorityQueueRemove {
public static void main(String[] args) {
// creating our queue
PriorityQueue<Integer> pq = new PriorityQueue<>();
pq.add(12);
pq.add(13);
pq.add(14);
pq.add(15);
pq.add(16);
pq.add(17);

System.out.println("Queue pq before invokinh remove() method");
System.out.println("pq = " + pq);

pq.remove();
System.out.println("after invoking remove() method the queue is");
System.out.println("pq = " + pq);

System.out.println("Queue pq before invoking clear() method");
System.out.println("pq = " + pq);
pq.clear();
System.out.println("Queue after invoking clear() method");
System.out.println("pq = " + pq);

}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...