assume that the list is implemented by doubly linked list the space requirement is (nmethod unsorted list sorted list sizeisempty ( ( insert ( (nminremovemin (no( java implementation in code fragments and we show java implementation of priority queue based on sorted node list this implementation uses nested classcalled myentryto implement the entry interface (see section we do not show auxiliary method checkkey( )which throws an invalidkeyexception if key cannot be compared with the comparator of the priority queue class defaultcomparatorwhich realizes comparator using the natural orderingis shown in code fragment code fragment portions of the java class sortedlistpriorityqueuewhich implements the priorityqueue interface the nested class myentry implements the entry interface (continues in code fragment