IBM Hiring | Off Campus OA (2025) | Minimum Common Value Problem
IBM · Question · Posted Jun 2026
Problem Statement You are given two sorted integer arrays nums1 and nums2 in non-decreasing order. Your task is to find the smallest integer that appears in both arrays. If there is no common element between the two arrays, return -1. Since both arrays are already sorted, an efficient solution is expected. Example 1 Input nums1 = [1,2,3] nums2 = [2,4] Output 2 Explanation The common elements between the arrays are: 2 The smallest common value is: 2 Example 2 Input ...
The full answer & interview discussion are available to premium members.
Log in Create a free account