[프로그래머스] 타겟넘버
import java.util.*; class Solution { int answer = 0; public int solution(int[] numbers, int target) { ArrayList temp = new ArrayList(); for(int i=0; i=v.size()){ if(sum == dest){ answer++; } return; } dfs(v,dest,sum+v.get(idx),idx+1); dfs(v,dest,sum-v.get(idx),idx+1); } }
2020.03.24