question: public static List < GraphChange > findHittingSet ( List < Set < GraphChange > > Forig ) { LinkedList < HsNode > currentLevel = new LinkedList < > ( ) ; LinkedList < HsNode > nextLevel = new LinkedList < > ( ) ; List < GraphChange > hittingSets = new ArrayList < > ( ) ; List < Set < GraphChange > > F ; F = precompute ( Forig ) ; currentLevel . addFirst ( new HsNode ( new GraphChange ( ) , 0 ) ) ; while ( ! currentLevel . isEmpty ( ) ) { HsNode n = currentLevel . removeFirst ( ) ; if ( nodeRedundant ( n , hittingSets ) ) { } else { int nextUCSigma = findNextUCSigma ( F , n ) ; if ( nextUCSigma == - 1 ) hittingSets . add ( n . getPath ( ) ) ; else { n . updateLabel ( nextUCSigma ) ; for ( GraphChange nextLCSigma : ( F . get ( nextUCSigma ) ) ) { GraphChange newPath = new GraphChange ( n . getPath ( ) ) ; if ( newPath . isConsistent ( nextLCSigma ) ) { newPath . union ( nextLCSigma ) ; if ( pathNecessary ( newPath , nextLevel ) ) nextLevel . add ( new HsNode ( newPath , n . getLabel ( ) ) ) ; } } } } if ( currentLevel . isEmpty ( ) ) { currentLevel = nextLevel ; nextLevel = new LinkedList < > ( ) ; } } return hittingSets ; }
target:  takes a List of HashSets of GraphChanges, and returns a List of GraphChanges.