Solarity interview question

Bounding array Hamming distance calculation