Algorithm

개발공부/algorithm

[Leetcode][python] 929: Unique email addresses

Leetcode 929: Unique email addresses Level: Easy Link Unique Email Addresses - 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 For each email addresses, split the local and domain address If '.' in the local address, remove it. If '+' in the local address, remove string..

개발공부/algorithm

[Leetcode][python] 1161: Maximum Level of sum of a binary tree - BFS

Leetcode: 1161 - Maximum level of sum of a binary tree Level: Medium Link Maximum Level Sum of a Binary Tree - 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 Iterate through the tree with a bfs approach For each level, sum up the value of each leaf update to a dictiona..

개발공부/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..

so.py
'Algorithm' 태그의 글 목록 (9 Page)