Loading...

[Python] Leetcode - Combination Sum

https://leetcode.com/problems/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인 배열을 return하는 문제이다. # 6번째 줄에서 comb를 바로 append하면 안되고, comb.copy()를 append해줘야 answer에 값이 제대로 들어간다. class Solution: def c..

[Python] LeetCode - Letter Combinations of a Phone Number

https://leetcode.com/problems/letter-combinations-of-a-phone-number/ Letter Combinations of a Phone Number - 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 # 외국 문제풀이 사이트인 LeetCode문제이다. 영어문제를 해석하면서 풀어야해서 영어실력 증진에도 도움이 되는 것 같다. # '백트래킹' 기초를 연습하기 위해 푼 문제이다. # class와 letterCombination..