create map of banned words
for ( let i = 0 ; i < S2 . length ; i ++ ) { let s = " " ; while ( i < S2 . length && S2 [ i ] != ' ' ) s += S2 [ i ++ ] ; banned . set ( s , banned [ s ] == null ? 1 : banned . get ( s ) + 1 ) ; } let result = new Map ( ) ; let ans = " " ; let freq = 0 ;