Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code, to pass test case #2214

Merged
merged 8 commits into from
Jan 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Solution.ts
  • Loading branch information
yanglbme authored Jan 14, 2024
commit 1e9ed3fa87f59d5ef8048e7db0c15b36796662bc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ class TreeAncestor {
for (let i = 0; i < n; ++i) {
p[i][0] = parent[i];
}
for (let i = 0; i < n; ++i) {
for (let j = 1; j < 18; ++j) {
for (let j = 1; j < 18; ++j) {
for (let i = 0; i < n; ++i) {
if (p[i][j - 1] === -1) {
continue;
}
Expand Down