Problem#8 :Unival Subtrees
2020. 8. 16. 00:31ㆍPS/도전
All problems are from https://www.dailycodingproblem.com/
Solution Codes : https://github.com/Kusin/DailyCoding
Daily Coding Problem#8 :Unival Subtrees
Problem Description
Solution
Time Complexity : O(N)
Space Complexity : O(N)
SVG File! You can click the image and Magnify it as much as you can.
Sorting at level 1 can be done by traversing level order at the given tree. So O(N)
728x90
'PS > 도전' 카테고리의 다른 글
Problem#10 : Time Lapse (0) | 2020.08.16 |
---|---|
Problem#9 : Non-Adjacent Sum (0) | 2020.08.16 |
Problem#7 : Decoding Possibility (0) | 2020.08.15 |
Problem #6 XOR Linked List (0) | 2020.08.15 |
Problem #5 Implementing Pair in Python (0) | 2020.08.15 |