Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def jots_for(one, two)
- def find_matches(list1, list2)
- matches=0
- list1.each do |x|
- list2.length.times do |i|
- if x==list2[i] then
- matches=matches+1
- list2.delete_at i
- break
- end
- end
- end
- return matches
- end
- return find_matches(one.split(//), two.split(//))
- end
Add Comment
Please, Sign In to add comment