Skip to content

Commit 76a1eba

Browse files
Update lowest_common_ancestor.py
1 parent 03c6154 commit 76a1eba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

data_structures/binary_tree/lowest_common_ancestor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create_sparse(max_node: int, parent: list[list[int]]) -> list[list[int]]:
2929
creating sparse table which saves each nodes 2^i-th parent
3030
>>> max_node = 6
3131
>>> parent = [[0, 0, 1, 1, 2, 2, 3]] + [[0] * 7 for _ in range(19)]
32-
>>> parent = create_sparse(max_node, parent)
32+
>>> parent = create_sparse(max_node=max_node, parent=parent)
3333
>>> parent[0]
3434
[0, 0, 1, 1, 2, 2, 3]
3535
>>> parent[1]
@@ -39,7 +39,7 @@ def create_sparse(max_node: int, parent: list[list[int]]) -> list[list[int]]:
3939
4040
>>> max_node = 1
4141
>>> parent = [[0, 0]] + [[0] * 2 for _ in range(19)]
42-
>>> parent = create_sparse(max_node, parent)
42+
>>> parent = create_sparse(max_node=max_node, parent=parent)
4343
>>> parent[0]
4444
[0, 0]
4545
>>> parent[1]

0 commit comments

Comments
 (0)