Guest User

Untitled

a guest
Jul 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def jots_for(one, two)
  2. def find_matches(list1, list2)
  3. matches=0
  4. list1.each do |x|
  5. list2.length.times do |i|
  6. if x==list2[i] then
  7. matches=matches+1
  8. list2.delete_at i
  9. break
  10. end
  11. end
  12. end
  13. return matches
  14. end
  15.  
  16. return find_matches(one.split(//), two.split(//))
  17. end
Add Comment
Please, Sign In to add comment