Given two integer arrays nums1 and nums2, return an array of their intersection.
Each element in the result must be unique. The result can be in any order.
Input: Two integer arrays nums1 and nums2.
Output: A sorted array of unique elements present in both arrays.
Input: [1,2,2,1],[2,2]
Output: [2]
Explanation: Common elements: {2}. Even though 2 repeats, output contains it once. Return [2].Input: [4,9,5],[9,4,9,8,4]
Output: [4,9]
Explanation: Common distinct elements: {4,9}. Return [4,9].Input: [1,2,3],[4,5,6]
Output: []
Explanation: No common elements. Return [].1 <= nums1.length, nums2.length <= 10^30 <= nums1[i], nums2[i] <= 10^3