Initially , frequencies of ' a ' , ' b ' , ' c ' and ' d ' are 0.
if ( mp . ContainsKey ( new Tuple < Tuple < int , int > , Tuple < int , int > > ( new Tuple < int , int > ( 0 , 0 ) , new Tuple < int , int > ( 0 , 0 ) ) ) ) { mp [ new Tuple < Tuple < int , int > , Tuple < int , int > > ( new Tuple < int , int > ( 0 , 0 ) , new Tuple < int , int > ( 0 , 0 ) ) ] ++ ; } else { mp [ new Tuple < Tuple < int , int > , Tuple < int , int > > ( new Tuple < int , int > ( 0 , 0 ) , new Tuple < int , int > ( 0 , 0 ) ) ] = 1 ; }