이분탐색 (1) 썸네일형 리스트형 프로그래머스 순위 검색 [level2][2021][카카오] 문제를 풀 때 참고한 분의 블로그 https://loosie.tistory.com/265 -을 위한 조합을 생각해야 했다. 그 자리에서 dfs를 구현했다. depth = 0으로 두고 n개 중에서 n개를 뽑는 경우의 수를 체크했다. Key에 depth 별로 -을 뽑고 안 뽑고로 진행했다. => 1개의 info당 16개의 경우의 수가 나온다. void dfs(String pos, int depth, String[] info) { if(depth == 4) { if(!allInfo.containsKey(pos)) { in = new ArrayList(); in.add(Integer.parseInt(info[4])); allInfo.put(pos, in); }else { allInfo.get(pos).add(I.. 이전 1 다음