ZUDDL Hiring Off-Campus OA (2025) | Problem Find the Difference of Two Arrays (Distinct)
Question · Posted Jun 2026
Problem Statement Given two 0-indexed integer arrays nums1 and nums2, return a list answer of size 2 where: answer[0] contains all distinct integers present in nums1 but not in nums2. answer[1] contains all distinct integers present in nums2 but not in nums1. The integers in each list can be returned in any order. Example Input: nums1 = [1,2,3,3] nums2 = [1,1,2,2] Output: [[3], []] Explanation: Distinct elements in nums1 = {1,2,3} Distinct elements in nums2 = {1,2} Elements present in ...
The full answer & interview discussion are available to premium members.
Log in Create a free account