
AC and Best Solution
1 |
def (self, root, min, max): |
Time complexity: O(n)
Space Complexity: O(1)
loop through all nodes, check if condition match
default min = python min int -1
default max = python max int +1

1 |
def (self, root, min, max): |
Time complexity: O(n)
Space Complexity: O(1)
loop through all nodes, check if condition match
default min = python min int -1
default max = python max int +1
近期评论