mirror of
https://github.com/TheAlgorithms/Ruby
synced 2025-01-13 08:01:03 +01:00
Update arrays_intersection.rb
This commit is contained in:
parent
745b66227b
commit
2197a587fb
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue