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

remove depth array from HLD #261

Conversation

lrvideckis
Copy link
Contributor

@lrvideckis lrvideckis commented Jul 29, 2024

now, HLD is less code && uses less memory

this change uses the observation that if u and v are on the same vertical path, then comparing depths is the same as comparing preorder values

I did run this test locally, and it passed https://github.com/kth-competitive-programming/kactl/blob/main/stress-tests/graph/HLD.cpp

@simonlindholm simonlindholm merged commit b7582d9 into kth-competitive-programming:main Jul 29, 2024
1 check passed
Elijah-Huang added a commit to nanoblob-jpeg/catlicku that referenced this pull request Aug 19, 2024
Elijah-Huang added a commit to nanoblob-jpeg/catlicku that referenced this pull request Aug 19, 2024
Elijah-Huang added a commit to nanoblob-jpeg/catlicku that referenced this pull request Aug 19, 2024
Evirir added a commit to matthewshang/uw-kactl that referenced this pull request Sep 1, 2024
@lrvideckis lrvideckis deleted the hld_remove_depth_array branch November 18, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants