its more fine than simple tik tokers or youtube roaster saying them self so called a star. galen colin is intelligent and he deserve a place of celebrity.
In the first question, how is vector using the push_back method? shouldn't the declaration for children be vector? Why is this code working it should be a compilation error.
Ur channel is underrated ... thanku so much buddy...pls make a series on how to master data structure and algorithms .. how to start competitive coding.. how to approach a algorithmic problem..it's my sincere request..
because we need 1 to reach the children and then we find the average of distances of the children it basically that before finding the avg of children we need to reach children right? so +1 is distance to reach the children.
In problem B why can't we make a directed tree/ graph? Because we know we start from 1, so we can start from it. And we cannot re visit the parent so we will add directed edge from parent to child. Why doesn't this work? I tried but got wrong answer on test case 4.
The problem is, you don't know which of the edges is the parent without running a DFS for more complicated trees. For example, take: 1 2 2 4 4 3 5 4 where there's no good order to direct an edge (e.g. 4 is the parent of 3, but 5 is not the parent of 4)
Damn colin, people really be asking you to say their name , you a celeb.
its more fine than simple tik tokers or youtube roaster saying them self so called a star. galen colin is intelligent and he deserve a place of celebrity.
In the first question, how is vector using the push_back method? shouldn't the declaration for children be vector? Why is this code working it should be a compilation error.
Ur channel is underrated ... thanku so much buddy...pls make a series on how to master data structure and algorithms .. how to start competitive coding.. how to approach a algorithmic problem..it's my sincere request..
Nice videos can U upload videos on queries on trees please:) as It is asked most frequently in many companies coding round:)
Time to learn from Legend. Come to my country.
this means so much to me , tysm
this stream is really great thanks alot for this
dear galen colin, please use a graphic tablet paired with OneNote or something similar for such long lectures, would be easy for you and us too
Use Epic pen instead of Paint (i think that would be more easier)
Thanks
Can you make a stream on Binary Search questions?
NIce video, thanks!
AWESOME!
Amazing Galen,,,,,,
Why '+1' in Mashup B? I still don't understand that.
because we need 1 to reach the children and then we find the average of distances of the children
it basically that before finding the avg of children we need to reach children right? so +1 is distance to reach the children.
@@mehulsethi5886 Okay it somewhat makes sense. But what if the edge lengths were different? Would we still have added '+1' or some other number?
@@hardikraj9469 we would have added the edge length in that case
@@mehulsethi5886 What if the edge lengths were different? Would we have added the maximum or the minimum edge length?
@@hardikraj9469 the average of all edge lengths
In problem B why can't we make a directed tree/ graph? Because we know we start from 1, so we can start from it. And we cannot re visit the parent so we will add directed edge from parent to child. Why doesn't this work? I tried but got wrong answer on test case 4.
The problem is, you don't know which of the edges is the parent without running a DFS for more complicated trees. For example, take:
1 2
2 4
4 3
5 4
where there's no good order to direct an edge (e.g. 4 is the parent of 3, but 5 is not the parent of 4)
@@ColinGalen Got it. Thank You!
as someone trying to code in python ,i find these problems offensive