Given a distinct set of integers, return all possible subsets.
Anonymous
public static void subset(int[] disntictSet){ if(disntictSet==null || disntictSet.length==0){ return; } int N=disntictSet.length; int allMasks = (1 0) //The j-th element is used System.out.print((j + 1) + " "); } System.out.println(); } }
Check out your Company Bowl for anonymous work chats.