Check if the character is on right side of window find the cost of modification for character add value to count calculate nearest distance of modification
else if ( j <= a && j <= b ) count = count + ( min ( a - j , 25 + j - b + 1 ) ) * cnt [ j ] ; } }