question: @ Override public Trie optimize ( Trie orig ) { List < CharSequence > cmds = orig . cmds ; List < Row > rows = new ArrayList < > ( ) ; List < Row > orows = orig . rows ; int remap [ ] = new int [ orows . size ( ) ] ; Arrays . fill ( remap , 1 ) ; for ( int j = orows . size ( ) - 1 ; j >= 0 ; j -- ) { if ( eat ( orows . get ( j ) , remap ) ) { remap [ j ] = 0 ; } } Arrays . fill ( remap , - 1 ) ; rows = removeGaps ( orig . root , orows , new ArrayList < Row > ( ) , remap ) ; return new Trie ( orig . forward , remap [ orig . root ] , cmds , rows ) ; }
target:  Return a Trie with infrequent values occurring in the given Trie removed.