Barclays OA 2024 | Mathematics & Two Pointers | On-campus

Barclays · Question · Posted Jun 2026

Question 1: Non Divisible Subsets Problem Statement You are given an array of integers of size N and another integer K. Find the size of the largest subset of the array in which the sum of any two numbers is not perfectly divisible by K. Input Format The first line of input contains T - the number of test cases. It's followed by 2T lines, the first line contains N and K, separated by a space. The second line contains ...

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

Log in Create a free account