You are given an integer array nums of even length. You need to split nums into two arrays nums1 and nums2 such that:
nums1.length nums2.length nums.length
nums1 contains only distinct elements.
nums2 contains only distinct elements.
Return true if it is possible to split the array, and false otherwise.
Constraints:
nums.length
nums.length
nums[i]
You are given an integer array nums of even length. You need to split nums into two arrays nums1 and nums2 such that:
nums1.length nums2.length nums.length
nums1 contains only distinct elements.
nums2 contains only distinct elements.
Return true if it is possible to split the array, and false otherwise.
Constraints:
nums.length
nums.length
nums[i]