MCPcopy Index your code
hub / github.com/HuberTRoy/leetCode / __init__

Method __init__

Tree/serializeAndDeserialize.py:53–63  ·  view source on GitHub ↗
(self, val, left=None, right=None)

Source from the content-addressed store, hash-verified

51class Node:
52
53 def __init__(self, val, left=None, right=None):
54 self.val = val
55 if isinstance(left, Node) or left == None:
56 self.left = left
57 else:
58 self.left = self.construct(left)
59
60 if isinstance(right, Node) or right == None:
61 self.right = right
62 else:
63 self.right = self.construct(right)
64
65 def __str__(self):
66

Callers

nothing calls this directly

Calls 1

constructMethod · 0.95

Tested by

no test coverage detected