This video is part of the Trie section under GFG SDE Sheet.
Given an array of integers of size N find minimum xor of any 2 elements.
Example 1:
Input:
N = 3
arr[] = {9,5,3}
Output: 6
Explanation:
There are 3 pairs -
9^5 = 12
5^3 = 6
9^3 = 10
Therefore output is 6.
Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!
Do check out:-
Problem: https://www.geeksforgeeks.org/problems/minimum-xor-value-pair/0
SDE Sheet Link: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/
Article Link: https://www.geeksforgeeks.org/minimum-xor-value-pair/