IBM 2022 | Bit Manipulation (XOR) & String Traversal | On-campus

IBM · Question · Posted Jun 2026

Question 1: Count Equal XOR Pairs Problem Statement You are given 2 arrays A and B of same size N. A pair (i, j) is said to be a valid if and only if A[i] ^ A[j] == B[i] ^ B[j]. You have to count total number of valid pairs. Input Format First line of input contains T - number of test cases. First line of each test case contains N - size of the array. The second and third ...

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

Log in Create a free account