Guest User

Untitled

a guest
Apr 25th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.08 KB | None | 0 0
  1. def hamming_distance (a,b)
  2. (a^b).to_s(2).count('1')
  3. end
  4.  
  5. hamming_distance(1,5)
Add Comment
Please, Sign In to add comment