バックトラッキング

Python

【LeetCode】51. N-Queens 解答・解説【Python】

はじめに LeetCodeの問題を解答します。 なるべく、問題の和訳と詳細なコメントを書いています。 余裕があれば、複数のアプローチの解答と、実際の面接を想定して英語での解法やコメントを書いています。 これま...
LeetCode

【LeetCode】216. Combination Sum III 解答・解説【Python】

はじめに LeetCodeの問題を解答します。 なるべく、問題の和訳と詳細なコメントを書いています。 余裕があれば、複数のアプローチの解答と、実際の面接を想定して英語での解法やコメントを書いています。 これまでこ...
LeetCode

【LeetCode】17. Letter Combinations of a Phone Number 解答・解説【Python】

問題 原文 Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number c...
LeetCode

【LeetCode】40. Combination Sum II 解答・解説【Python】

問題 原文 Given a collection of candidate numbers (candidates) and a target number (target), find all unique combination...