Skip to content

Commit 715e76e

Browse files
author
Hamid Gasmi
committed
#295 new solution is started
1 parent 98ad954 commit 715e76e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

09-problems/lc_1483_kth_ancestor_of_tree_node.py

+7
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,10 @@ def getKthAncestor(self, node: int, k: int) -> int:
110110
self.ancestors[node].extend(self.ancestors[ancestor])
111111

112112
return self.ancestors[node][k - 1] if k <= len(self.ancestors[node]) else -1
113+
114+
class TreeAncestorBinaryLifting:
115+
def __init__(self, n: int, parent: List[int]):
116+
pass
117+
118+
def getKthAncestor(self, node: int, k: int) -> int:
119+
pass

0 commit comments

Comments
 (0)