DAYS
HOUR
MINS
SEC
Error
Given an array of non-negative integers of size N. Find the maximum possible XOR between two numbers present in the array.
Example 1:
Input: Arr = {25, 10, 2, 8, 5, 3} Output: 28 Explanation: The maximum result is 5 ^ 25 = 28.
Example 2:
Input : Arr = {1, 2, 3, 4, 5, 6, 7} Output : 7 Explanation : The maximum result is 1 ^ 6 = 7.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes