class Solution:
def bounaryOfBinaryTree(self,root):
if not root: return []
left_result=[]
right_result=[]
left_stack=[]
right_stack=[]
if root.left:
left_boundary_traversal_done=False
left_stack.append(root.left)
while left_stack:
node=left_stack.pop()
left=node.left
right=node.right
if right:
网友评论