Update arrays_intersection.rb

This commit is contained in:
Vitor Oliveira 2021-04-10 10:15:00 -07:00 committed by GitHub
parent 745b66227b
commit 2197a587fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ def arrays_intersection(arr1, arr2, arr3)
add_to_hash(arr2, hash)
add_to_hash(arr3, hash)
hash.select { |_key, value| value == 3 }.keys
hash.select { |key, value| value == 3 }.keys
end
def add_to_hash(arr, hash)