utils: + methods for calculation min and max hamming distance