Set Intersection

Submitted By:
znz

Difficulty:
Elementary

Tags:
arrays

Instructions:
The operator returns a new array containing elements common to the two arrays, with no duplicates.

Code:
assert_equal ([ 1, 1, 3, 5 ] ___ [ 1, 2, 3 ]), [ 1, 3 ]

Your Solution

Ruby 1.9.3

Back to Problems