If common subsequence is found , increment its frequency
if ( map . has ( t ) ) map . set ( t , map . get ( t ) + 1 ) ; else map . set ( t , 1 ) ; } } let res = 0 ; for ( let [ key , value ] of map . entries ( ) )