Skip to content

Instantly share code, notes, and snippets.

@Niall47
Created November 5, 2021 09:49
Show Gist options
  • Save Niall47/94c934bfaf0babcf7de7e4fcab7e1dba to your computer and use it in GitHub Desktop.
Save Niall47/94c934bfaf0babcf7de7e4fcab7e1dba to your computer and use it in GitHub Desktop.
string1 = 'GAGCCTACTAACGGGAT'.chars
string2 = 'CATCGTAATGACGGCCT'.chars
diff = 0
string1.each_with_index do |character, index|
if character != string2[index]
diff +=1
end
end
puts diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment