@Override protected Node removeFromFrontier(){
  cleanUpFrontier();
  Node result=frontier.remove();
  explored.add(result.getState());
  updateMetrics(frontier.size());
  return result;
}

@ Override protected Node removeFromFrontier ( ) { cleanUpFrontier ( ) ; Node result = frontier . remove ( ) ; explored . add ( result . getState ( ) ) ; updateMetrics ( frontier . size ( ) ) ; return result ; }
removes the node at the head of the frontier , adds the corresponding state to the explored set , and returns the node . leading nodes of already explored states are dropped . so the resulting node state will always be unexplored yet .
