Given two integer arrays `nums1` and `nums2`, return an array of their **intersection**. Each element in the result must be **unique**, and the result must be sorted in **ascending order**.
Note this differs from the "Intersection of Two Arrays II" variant: here duplicates are collapsed - each common value appears exactly once in the output.
Example 1
Input:nums1 = [1,2,2,1], nums2 = [2,2]
Output:[2]
Explanation:2 is the only value present in both arrays; it appears once despite duplicates.
Example 2
Input:nums1 = [4,9,5], nums2 = [9,4,9,8,4]
Output:[4,9]
Explanation:Both 4 and 9 appear in each array. The result is sorted ascending.
Example 3
Input:nums1 = [1,2,3], nums2 = [4,5,6]
Output:[]
Constraints
- 1 <= nums1.length, nums2.length <= 1000
- 0 <= nums1[i], nums2[i] <= 1000
- Return the result sorted in ascending order.