If common subsequence is found , increment its frequency
if ( map . ContainsKey ( t ) ) { int value = map [ t ] + 1 ; map . Remove ( t ) ; map . Add ( t , value ) ; } else map . Add ( t , 1 ) ; } } int res = 0 ; foreach ( KeyValuePair < string , int > entry in map )