=0; j--) { int currentPot = pot.get(j); if (y >= currentPot) { binArray[j] = true; y -= currentPot; sum++; } if (y<=0) break; } if (sum==m){ new L subsubset; for (int j=0; j < n; j++) if (binArray[j]) subsubset.add(objects.get(j)); subsets.add(subsubset); } } ret subsets; }