Intersection of Multiple Arrays

Here is a simple Python solution for this problem. We’ll use Python’s set data structure to find the intersection of the numbers in each list.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
class Solution:
    def intersection(self, nums: List[List[int]]) -> List[int]:
        # Convert the first list to a set
        common_set = set(nums[0])

        # For each remaining list, take the intersection of the current set and the new list
        for i in range(1, len(nums)):
            common_set = common_set & set(nums[i])

        # Return the intersection set as a sorted list
        return sorted(list(common_set))

In the above code, we start by converting the first list of integers to a set. Then, for each of the remaining lists of integers, we compute the intersection of the current set with the new list. The result is a set of integers that are common to all lists. We return this set as a sorted list.

This solution assumes that each list in nums contains unique integers, as per the problem constraints.