์ฝ๋ฉํ
์คํธ/LeetCode
2022. 7. 11.
[LeetCode] Combination Sum
๋ฌธ์ ๋งํฌ Combination Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com ์ ์ ๋ฐฐ์ด candidates๊ฐ ์ฃผ์ด์ง๊ณ target ๊ฐ์ด ์ฃผ์ด์ง๋ candidates์ element๋ฅผ ํตํด target์ ๋ง๋ค ์ ์๋ ๋ชจ๋ ๊ฒฝ์ฐ๋ฅผ ๋ฐฐ์ด์ ๋ด์ return ํ๋ ๋ฌธ์ ์ด๋ค. ์กฐ๊ฑด : candidates์ element๋ ์ค๋ณต์ผ๋ก ์ฌ์ฉํ ์ ์๋ค. candidates = [2,3,6,7], target = 7์ธ ๊ฒฝ์ฐ return [[2,2,3], [7]] ์ ..