Skip to content

Commit 1e9ed3f

Browse files
authored
Update Solution.ts
1 parent e245fa3 commit 1e9ed3f

File tree

1 file changed

+2
-2
lines changed
  • solution/1400-1499/1483.Kth Ancestor of a Tree Node

1 file changed

+2
-2
lines changed

solution/1400-1499/1483.Kth Ancestor of a Tree Node/Solution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class TreeAncestor {
66
for (let i = 0; i < n; ++i) {
77
p[i][0] = parent[i];
88
}
9-
for (let i = 0; i < n; ++i) {
10-
for (let j = 1; j < 18; ++j) {
9+
for (let j = 1; j < 18; ++j) {
10+
for (let i = 0; i < n; ++i) {
1111
if (p[i][j - 1] === -1) {
1212
continue;
1313
}

0 commit comments

Comments
 (0)