MCPcopy Create free account
hub / github.com/Jack-Lee-Hiter/AlgorithmsByPython / __init__

Method __init__

leetcode/112. Path Sum.py:17–20  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

15# Definition for a binary tree node.
16class TreeNode(object):
17 def __init__(self, x):
18 self.val = x
19 self.left = None
20 self.right = None
21
22class Solution(object):
23 def hasPathSum(self, root, sum):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected