Skip to content

Latest commit

 

History

History
 
 

HammingDistance

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Hamming Distance

The Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of substitutions required to change one string into the other, or the minimum number of errors that could have transformed one string into the other. In a more general context, the Hamming distance is one of several string metrics for measuring the edit distance between two sequences.

Hamming Distance

Examples

The Hamming distance between:

  • "karolin" and "kathrin" is 3.
  • "karolin" and "kerstin" is 3.

Implementation

References