question: private void cleanUpFrontier ( ) { while ( ! frontier . isEmpty ( ) && isExplored ( frontier . element ( ) ) ) frontier . remove ( ) ; }
target:  Helper method which removes nodes of already explored states from the head of the frontier.