@Override public void clear(){
  Arrays.fill(elements,null);
  size=0;
}

@ Override public void clear ( ) { Arrays . fill ( elements , null ) ; size = 0 ; }
removes all the elements of the priority queue .
