Anonymous user
Most frequent k chars distance: Difference between revisions
no edit summary
No edit summary |
|||
Line 57:
</lang>
Aim of 'Most Frequent K Hashing' function is calculating the most count of each character and returning the K most frequent character with the character and count. Rules of hash can be listed as below:
* Output will hold the character and count
* Most frequent character and count will appear before the least frequent at the output
* if two characters have equal frequency, the first appearing in input will appear before at the output
Similar to the most of [[wp:hashing function|hashing functions]], ''Most Frequent K Hashing'' is also a [[wp:one way function]].
===Most Frequent K Distance===
Distance calculation between two strings is based on the hash outputs of two strings.
<lang java>
int function MostFreqKSimilarity (String inputStr1, String inputStr2)
|