Skip to content

Instantly share code, notes, and snippets.

@yorickpeterse
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorickpeterse/d09086460394c3b3da9e to your computer and use it in GitHub Desktop.
Save yorickpeterse/d09086460394c3b3da9e to your computer and use it in GitHub Desktop.
one = 'AGG'
two = 'AAAACTGACCCACCCCAGG'
dist = 0
one.each_char.with_index do |char, index|
dist += 1 if two[index] != char
end
puts dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment