Skip to content

Commit 2626b40

Browse files
authored
Update encode-n-ary-tree-to-binary-tree.py
1 parent 03694ba commit 2626b40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Python/encode-n-ary-tree-to-binary-tree.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Time: O(n)
22
# Space: O(h)
33

4-
"""
54
# Definition for a Node.
65
class Node(object):
76
def __init__(self, val, children):
87
self.val = val
98
self.children = children
10-
"""
11-
"""
9+
10+
1211
# Definition for a binary tree node.
1312
class TreeNode(object):
1413
def __init__(self, x):
1514
self.val = x
1615
self.left = None
1716
self.right = None
18-
"""
17+
18+
1919
class Codec:
2020

2121
def encode(self, root):

0 commit comments

Comments
 (0)