You are given an integer array
numsof even length. You have to split the array into two partsnums1andnums2such that:
nums1.length == nums2.length == nums.length / 2.nums1should contain distinct elements.nums2should also contain distinct elements.Return
trueif it is possible to split the array, andfalseotherwise**.
1 | class Solution { |