Problem 6:
Hamming Rotations
The Hamming Distance between two strings, a and b, is the number of characters
that are different between them. For example, the Hamming distance between
abc and abd is 1.
A rotation of a string is a shift of the letters of the string such that
letters that fall off one end wrap around to the other side. For example
wxyz and yzwx are rotations of one another.
For this problem, take two strings as input from stdin, and print out the
minimum Hamming distance of any rotations of the two strings.
Examples:
wxyz
yzwx
Minimum distance = 0
abcdefg
efXXbcd
Minimum distance = 2
To hand in the program, use the command:
handin acmjudge prog6