DIGIT INSURANCE Hiring On-Campus OA (2021) | Two Out of Three Problem

Question · Posted Jun 2026

Problem Statement Given three integer arrays nums1, nums2, and nums3, return all distinct values that appear in at least two out of the three arrays. The order of the returned values does not matter. Example Input nums1 = [1,1,3,2] nums2 = [2,3] nums3 = [3] Output [2,3] Explanation 2 appears in nums1 and nums2 3 appears in nums1, nums2 and nums3 Both values appear in at least two arrays. Constraints 1 <= nums1.length, nums2.length, nums3.length <= 100 1 <= nums[i] ...

The full answer & interview discussion are available to premium members.

Log in Create a free account