Guest User

Untitled

a guest
Mar 25th, 2018
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. def findMax(root, mySet, max):
  2.     if root == None:
  3.         if len(mySet) >= max:
  4.             max = len(mySet)
  5. mySet.add(root.val)
  6. if mySet.left != None:
  7.     findMax(root.left, root, max)
  8. if mySet.right != None:
  9.     findMax(root.right, root, max)
Advertisement
Add Comment
Please, Sign In to add comment