MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / isSameTree

Method isSameTree

Python/100.SameTree.py:15–18  ·  view source on GitHub ↗
(self, p: TreeNode, q: TreeNode)

Source from the content-addressed store, hash-verified

13class Solution:
14
15 def isSameTree(self, p: TreeNode, q: TreeNode) -> bool:
16 result = []
17 self.preorder(p, q, result)
18 return min(result)
19
20 def preorder(self, p, q, result):
21 if not p and not q:

Callers

nothing calls this directly

Calls 1

preorderMethod · 0.95

Tested by

no test coverage detected