Created
September 12, 2023 18:52
-
-
Save rohanjai777/74cc7330e32f44881f834c9ce53ce1b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void getAllSubsets(int[] nums, int i, int xor){ | |
if(i>=nums.length){ | |
//any terminating condition | |
} | |
getAllSubsets(nums,i+1,xor^nums[i]);//picked | |
getAllSubsets(nums,i+1,xor);//not picked | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment