Please find my implementation: public KeyedItem remove() { //DO THIS //remove the smallest item // since Linked List is in sorted order, so head is the samllest element if(head == null) return null; // return head element and move head one step forward KeyedItem item = head.getItem(); head = head.getNext(); return item; } private Node locateNodeAdd(KeyedItem item) { //DO THIS //find the insertion location (remember FIFO for duplicates) Node curr = head; Node prev = null; while(curr != null){ if((current.getItem().getKey()).compareTo(item.getKey) >= 0){ return prev; } prev = curr; curr = curr.getNext(); } return prev; } Solution Please find my implementation: public KeyedItem remove() { //DO THIS //remove the smallest item // since Linked List is in sorted order, so head is the samllest element if(head == null) return null; // return head element and move head one step forward KeyedItem item = head.getItem(); head = head.getNext(); return item; } private Node locateNodeAdd(KeyedItem item) { //DO THIS //find the insertion location (remember FIFO for duplicates) Node curr = head; Node prev = null; while(curr != null){ if((current.getItem().getKey()).compareTo(item.getKey) >= 0){ return prev; } prev = curr; curr = curr.getNext(); } return prev; }.