combination 썸네일형 리스트형 자바 조합 //부분 집합 만들기 public class Test_Combination { static String[] cards = { "A", "B", "C" }; static boolean[] select = new boolean[cards.length]; static void comb(int idx, int cnt) { if (cnt == 2) { System.out.print("지금 만들어진 조합 : { "); for (int i = 0; i < cards.length; i++) { if (select[i]) { System.out.print(cards[i] + " "); } } System.out.println("}"); return; } if (idx == cards.length) { return; } .. 더보기 이전 1 다음