Directi 2025-February | Tries & Maximum Bitwise XOR | On-campus

Directi · Question · Posted Jun 2026

Question 1: Maximum XOR of Two Numbers Problem Statement You are given an array A of N integers. You must find the maximum Bitwise XOR value that can be obtained by choosing any two elements A[i] and A[j] from the array (where i can be equal to j). Input Format The first line contains T - the number of test cases. The first line of each testcase contains a single integer N - the size of the array. The second ...

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

Log in Create a free account