Implemented hamming distance with test coverage.