Need a unique gift idea?
A Pastebin account makes a great Christmas gift


a guest May 23rd, 2018 51 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. class TreeNode(object):
  2. def __init__(self, value):
  3.     self.left = None
  4.     self.right = None
  5. = value
  7. def checkRowOnTree(tree, M):
  8.   if tree is None:
  9.       return False
  10.   n = len(M)
  11.   m = len(M[0])
  12.   flag = []
  13.   for i in range(n):
  14.       for j in range(m):
  15.           if tree is not None:
  16.               return( == (M[i][j]) and   checkRowOnTree(tree.left, M) and checkRowOnTree(tree.right, M))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand