12 Jan 2020 : New Video Lecture Added
L07 : In / Out Time of Nodes
Was waiting for this.
busy schedule makes it hard making videos , but i try my best brother.
you can count number of children of a node by simply finding the size of its adjacency list , if it is not root subtract 1 from it.
Try little harder , you can do it.
thanks for the hint man , i will try it.
good luck with that .
i was talking about the video series.those are really helpful.
thatβs why i work on video series.
Till now i have completed 2 series.
Really need people like you.
thank you man for the complement
Add edge colouring and vertex colouring to the list
part 1 of the series is merely the intro , concepts like coloring and centroid decomposition will be covered in part 2.
i am trying to finish part 1 ASAP.
Can you please tell me from where you practice for question and from where you clear your doubts?
mostly i practice from codeforces , but in the beginning i think people should start from hackerearth.
yeah that would be helpful
Can you please explain me this section of code actually i am quite dull in recursion
how did you updated count of nodes from child nodes.
root->cnt = root->cnt - cnt;
if(root->cnt > 1)
{
lli n = (root->cnt / 2);
lli tmp = (height / 2) * (height / 2);
ans += n * tmp;
cnt += 2 * n;
}
delete root;
return cnt;
For this there would be a recursive call to dfs( ) function again.
if you are not good at recursion , try studying it from basics , like finding N! using recursion and Fibonacci number.