개발공부/algorithm
[Leetcode][python] 257: binary tree paths - DFS
Leetcode 257 Binary tree paths Level: Easy Link Binary Tree Paths - 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 My approach Classic dfs problem with a tree data structure Check if a root has left or right leaf If either the left or right leaf exists: perform dfs recursively wit..