Ford Prefect get job web developer small company make towel his current work task create search engine website company during development process need write subroutine compare string S T equal length similar after brief search internet learn Hamming distance string S T length define number position S t different character for example hamming distance word permanent pergament word differ fourth sixth lettersmoreover search information notice modern search engine powerful mechanism correct error request improve quality search Ford do not know human being assume common mistake request swap arbitrary letter stre necessarily adjacent now want write function determine letter swap string S Hamming distance new string S string T small possible determine replacement reduce distance stringshelp