Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def findMax(root, mySet, max):
- if root == None:
- if len(mySet) >= max:
- max = len(mySet)
- mySet.add(root.val)
- if mySet.left != None:
- findMax(root.left, root, max)
- if mySet.right != None:
- findMax(root.right, root, max)
Advertisement
Add Comment
Please, Sign In to add comment