Skip to content

Akshat diameter division#6

Open
AkshatGupta468 wants to merge 8 commits intoy23-24from
akshat-diameterDivision
Open

Akshat diameter division#6
AkshatGupta468 wants to merge 8 commits intoy23-24from
akshat-diameterDivision

Conversation

@AkshatGupta468
Copy link

No description provided.

@AkshatGupta468 AkshatGupta468 changed the base branch from main to y23-24 August 26, 2023 18:15
minComponents(v, x, d, components);
childsDepth.push_back(depth[v]);
}
sort(childsDepth.begin(), childsDepth.end());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort introduces an overhead of log(n)


for (int k = last;k >= 1;k--) {
int l = 0, r = n;
while (l + 1 != r) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add details about binary search in description

adj[u].push_back(v);
adj[v].push_back(u);
}
int flim = sqrt(n * log2(n)) + 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better if this is done dynamically, something like d<=(kmin*overhead) than using statically calculated value

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