• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
January 04, 2024 |390 Views
SDE Sheet - Maximum subset XOR
  Share   Like
Description
Discussion

This video is part of Bit Manipulation section under GFG SDE Sheet.

In this problem, we are given an array arr[] of N positive integers. Find an integer denoting the maximum XOR subset value in the given array arr[].

Example :

Input : 
N = 3
arr[] = {2, 4, 5}
Output : 7

Explanation : 
The subset {2, 5} has maximum subset XOR value.

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:-
Article: https://www.geeksforgeeks.org/find-maximum-subset-xor-given-set/
Problem: https://www.geeksforgeeks.org/problems/maximum-subset-xor/1
SDE Sheet Link: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/

Read More