In ruby, how do I test that one array not only has the elements of another array, but contain them in that particular order?
correct_combination = [1, 2, 3, 4, 5
This is what I came up with
a = [1, 2, 3, 4, 5] b = [2, 3, 5] c = [3, 9] irb(main):037:0* (a + b).sort.uniq == a.sort.uniq => true irb(main):038:0> (a + c).sort.uniq == a.sort.uniq => false