def test_011(self): root = TreeNode() root = root.build([0, 1, 0, 0, 1, 0, 8, 8, 1, 0, 0], root, 0) self.assertFalse(sequence_in_tree(root, [0, 1, 1]))
def test_0035(self): root = TreeNode() root = root.build([0, 0, 1, 3, 4, 2, None, 5], root, 0) self.assertTrue(sequence_in_tree(root, [0, 0, 3, 5]))
def test_0101(self): root = TreeNode() root = root.build([0, 1, 0, 0, 1, 0, None, None, 1, 0, 0], root, 0) self.assertTrue(sequence_in_tree(root, [0, 1, 0, 1]))
def test_29180(self): root = TreeNode() root = root.build([2, 9, 3, None, 1, None, 2, None, None, None, 8], root, 0) self.assertFalse(sequence_in_tree(root, [2, 9, 1, 8, 0]))