Skip to content

Commit 7177043

Browse files
committed
Runtime: 139 ms (Top 73.10%) | Memory: 16.3 MB (Top 54.16%)
1 parent f519f4c commit 7177043

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/algorithms/L/Linked List in Binary Tree/Linked List in Binary Tree.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# Runtime: 139 ms (Top 73.10%) | Memory: 16.3 MB (Top 54.16%)
2+
13
class Solution(object):
24
def isSubPath(self, head, root):
3-
if not root:
5+
if not root:
46
return False
57
if self.issame(head, root):
68
return True
@@ -12,4 +14,4 @@ def issame(self, head, root):
1214
return False
1315
if head.val != root.val:
1416
return False
15-
return self.issame(head.next, root.left) or self.issame(head.next, root.right)
17+
return self.issame(head.next, root.left) or self.issame(head.next, root.right)

0 commit comments

Comments
 (0)