Word Break 2
Word Break II 문제 내용 및 풀이 방법은 2020.09.29 - [Problem Solving] - 139. Word Break 와 동일하다. 다른 점이 있다면 word break 1번 문제는 Dictionary로 해당 문자를 만들 수 있는가? 이고 word break 2번 문제는 모든 경우의 수를 return 하는 것이 다르다. public List wordBreak(String s, List wordDict) { return dfs(s, wordDict, new HashMap()); } public ArrayList dfs(String s, List wordDict, HashMap dp) { ArrayList result = new ArrayList(); if (dp.containsKey(..