Ruby - Arrays
Given two arrays a = [1, 2, 3, 4] and b = [3, 4, 5, 6], how can you find elements that are in either array but not in both?
Given two arrays a = [1, 2, 3, 4] and b = [3, 4, 5, 6], how can you find elements that are in either array but not in both?
(a | b) and subtract intersection (a & b) to get symmetric difference.(a | b) - (a & b) for symmetric difference -> Option D15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions