String Distance Metric and Max Freq K Chars Hashing Code

A complete code, including ‘Max Frequent K Chars’ hashing function and
‘String Distance Function’