Surprised that we don't have a symmetric difference challenge yet.
Given two lists only containing positive integers, return all items among these two lists that aren't contained in both of the lists.
From the set definition:
A set is a collection of definite distinct items.
- So you can assume the items in the input lists are always unique.
- You can also take input as a set if your language supports it.
Here is a sample program that generates the test cases.
[1,2,3],[2,3,4] -> [1,4]