IBM, Recently Asked Online Assessments in 7 Nov, 2025 | Number of Pairs | Maximum Containers
IBM · Question · Posted Apr 2026
Question 1: Number of Pairs Problem Statement: Implement a function that counts the number of ordered pairs of 0-based indices (x, y) in an array arr of size n such that the sum arr[x] + arr[y] is greater than or equal to lowerLimit and less than or equal to upperLimit. The function getNumberOfPairs will take three inputs: int arr[n]: The given array int lowerLimit: The lower limit of the sum int upperLimit: The upper limit of the sum The function ...
The full answer & interview discussion are available to premium members.
Log in Create a free account