Implement solve(...arrays) that returns the intersection of all provided
arrays — elements present in every array — without duplicates, in the
order they appear in the first array.
Examples
solve([1,2,3,4], [2,4,6]) → [2,4]solve([1,2,3], [2,3,4], [3,5,6]) → [3]solve([1,2,3]) → [1,2,3] (only one array → itself, deduplicated)Sample tests