본문 바로가기
728x90
반응형

Recursion4

Leetcode 37 스도쿠 문제 풀이 정리 https://leetcode.com/problems/sudoku-solver/ Sudoku Solver - 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에서 다시 만났습니다 스도쿠의 규칙을 어떤 식으로 적용했는지를 중심으로 여러 풀이를 분석해보겠습니다 깔끔한 Back Tracking 풀이 ) class Solution: def solveSudoku(self, board: List[.. 2022. 11. 19.
Leetcode 24. Pathsum2 (DFS, Backtracking) https://leetcode.com/problems/path-sum-ii/ Path Sum II - 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 네,,, 다시 만난 백트래킹 문제로 이진트리에서 root에서 leaf노드까지 갔을 때의 경로합이 targetSum에 해당하는 path를 전부 반환하는 문제입니다. 여러 시행착오와 다른 분들 자료를 참고하면서 답변을 짜봤습니다 재귀 DFS 방법 ) # Definition for a binary tree node. # .. 2022. 10. 26.
Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ Construct Binary Tree from Preorder and Inorder Traversal - 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 또 다시 만난 Binary Tree 문제입니다 여러 문제를 풀다보니까 이제야 Binary Tree의 구조가 입체적으로 조금이나마 그려지는 것 같습니다 이.. 2022. 10. 6.
Leetcode 139. Word Break (Trie, BFS, DP) https://leetcode.com/problems/word-break/ Word Break - 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 이전에 Trie의 개념과 기본 구조를 다루는 문제를 풀었었는데요 2022.09.27 - [Data Structure & Algorithm] - Trie (트라이, Digital tree, prefix, Retrieval tree) + 예제 코드 Trie (트라이, Digital tree, prefix, Retrieval.. 2022. 10. 3.
728x90
반응형