News

Initialize union U as empty. Find smaller of m and n and sort the smaller array. Copy the smaller array to U. For every element x of larger array, do the following Binary Search x in the smaller array ...
Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the result in any order.