Make sure, this is one such problem where Intuition is very important, WHY? is very important, so I'll highly recommend to watch Intuition part, no-one on yt will tell it, they will just show you❤💻
Bro,A recommendation from my side.Today I searched MINIMUM HEIGHT TREE ON TH-cam.I EXCEPTED UR VIDEO TO BE PRESENT THERE BUT THIS VIDEO WAS NOT IN THE LIST.EVEN I SCROLLED TO THE BOTTOM,THIS VIDEO WAS NOT THERE UNDER THE SEARCH OF"MINIMUM HEIGHT TREE".OTHER CHANNEL VIDEO ON THIS PROBLEM SOLN WAS THERE.THEN I SEARCHED "MINIMUM HEIGHT TREE BY ARYAN MITTAL".THEN ALSO THE VIDEO WAS NOT THERE.UR CHANNEL WAS COMING.THEN I WENT INTO UR CHANNEL AND FROM THERE I FOUND OUT THIS VIDEO. SO BASICALLY U DOING SO MUCH HARD WORK AND MAKING QUALITY VIDEOS AND STILL THE VIDEO NOT GETTING MUCH REACH .THE REASON IS THAT THE TH-cam IS NOT RECOMMENDING UR VIDEOS OR TH-cam ALGORITHM IS NOT PUSHING UR VIDEOS.THEREFORE ,U SHOULD DO SOMETHING TO RESOLVE THIS BCZ UR VIDEOS DESERVE TO GET MORE REACH.
You explained very well, I also thought similar, but I was doing with visited vector, I was not using the frequency vector. Thank you Aryan Bhaiya, you are my inspiration.
bro your video is not coming in youtube search, are you shadowbanned? please confirm or do something. you are the best and it hurts to see this slow growth.
yr vo mja nhi h aapki explananation me thoda over kr dete ho therefore confusion ho jati h just a review from my side like everyone has different views and perspectives rest explanation is okay
Totally agree with you, he over explains some basic parts, due to which the interest breaks down in between while watching. Personally I also love videos with precise explanations. But I think he do it purposely so that even a person who is not so much good can understand the intuition. And I think nowdays most of the people get that much basic understanding by solving basic problems.
Make sure, this is one such problem where Intuition is very important, WHY? is very important, so I'll highly recommend to watch Intuition part, no-one on yt will tell it, they will just show you❤💻
This is the reason, you are the knly one i subscribed on YT for DSA. ❤
Bro,A recommendation from my side.Today I searched MINIMUM HEIGHT TREE ON TH-cam.I EXCEPTED UR VIDEO TO BE PRESENT THERE BUT THIS VIDEO WAS NOT IN THE LIST.EVEN I SCROLLED TO THE BOTTOM,THIS VIDEO WAS NOT THERE UNDER THE SEARCH OF"MINIMUM HEIGHT TREE".OTHER CHANNEL VIDEO ON THIS PROBLEM SOLN WAS THERE.THEN I SEARCHED "MINIMUM HEIGHT TREE BY ARYAN MITTAL".THEN ALSO THE VIDEO WAS NOT THERE.UR CHANNEL WAS COMING.THEN I WENT INTO UR CHANNEL AND FROM THERE I FOUND OUT THIS VIDEO.
SO BASICALLY U DOING SO MUCH HARD WORK AND MAKING QUALITY VIDEOS AND STILL THE VIDEO NOT GETTING MUCH REACH .THE REASON IS THAT THE TH-cam IS NOT RECOMMENDING UR VIDEOS OR TH-cam ALGORITHM IS NOT PUSHING UR VIDEOS.THEREFORE ,U SHOULD DO SOMETHING TO RESOLVE THIS BCZ UR VIDEOS DESERVE TO GET MORE REACH.
You could simply subscribe to his channel.
Also a suggestion, It's harder to read the message with caps lock on. Kindly edit.
Thanks 🤙🏻
The chain example was just mind blowing!
intuition is more important than actual algorithm 👍
GREAT EXPLANATION!!!
Best Explaination
Today I got to know the practical implementation of Topological Sort :) Thank you so much!
You explained very well, I also thought similar, but I was doing with visited vector, I was not using the frequency vector. Thank you Aryan Bhaiya, you are my inspiration.
Ur explanation is awesome
very decent logic building and now i totally can think of many diffrent situation where i can use this logic. thanks aryan
dude you the most consistent content creator on internet right now.. that too top notch quality content. keep going man! I am with you
and now he just stopped making videos
well you helped a lot with your consistency of creating video my upsolving efficincey is very good all because of you
Bro loved your intuituion you are the best .
Excellent Explanation , thank you
Excellent explanation!!!!!
Its really informative. I hope one day I could solve and think intution like you. Inspiration❤
Your style ❤
excellent explanation bhai !!
it is jst so awsmm🤯🤯
thanks for consistently uploading videos
Nice work Bro!
nice
good to go chief
Thankyou... helpful
2:26 bohot yaarana lagta hai XD
can i use priority queue instead of simple queue ?
karo bhai subscribe krte kyu nahi!!
bro your video is not coming in youtube search, are you shadowbanned? please confirm or do something. you are the best and it hurts to see this slow growth.
Please code in Java it will be really helpful. Thanks for the OP explanation
NO Cpp Better. U need to learn Cpp🙂🙂
@@SDHANUSH-l9u I am coding in Java since my class 8 so I like Java more haha and there's no difference much it's just preferential
@@muntajir646 It is ur wish. But with cpp u get short statements which will really help u
bhaiya can u please attach the pdf of the pages that u used here on notepad ??
Please do code in java and explain that too...
kaha gayab ho gaye ho bhai .... ba POD kaha se dekhu
I solved this question using maximum diameter but iam getting memory limit exceeded passed 70/71 testcases can anyone optimized it
class Solution {
vector diam;
vector maxDiam(int prev, int curr, vector &adj){
vector temp1, temp2;
for(auto &it: adj[curr]){
if(it!=prev){
vector node=maxDiam(curr, it, adj);
if(node.size()>temp1.size()){
temp2=temp1;
temp1=node;
}
else if(node.size()>temp2.size()){
temp2=node;
}
}
}
temp1.push_back(curr);
if(temp1.size()+temp2.size()+1>diam.size()){
vector node=temp1;
node.insert(node.end(), temp2.begin(), temp2.end());
diam=node;
}
return temp1;
}
public:
vector findMinHeightTrees(int n, vector& edges) {
if(n
edge case do a simply check in starting if(n==1) return {0};
@@aastikofficial6100 Recently solved by doing some change in my method
Here is the code.
class Solution {
pair t1={0, 0}, t2={0, 0};
pair max_pair(pair &p1, pair &p2){
if(p2.second>=p1.second){
return p2;
}
else{
return p1;
}
}
pair maxDiam(int node, int prev, vector &adj){
pair max1={0, 0}, max2={0, 0};
for(auto &it: adj[node]){
if(it!=prev){
pair temp=maxDiam(it, node, adj);
if(max1.second
yr vo mja nhi h aapki explananation me thoda over kr dete ho therefore confusion ho jati h just a review from my side like everyone has different views and perspectives rest explanation is okay
Totally agree with you, he over explains some basic parts, due to which the interest breaks down in between while watching. Personally I also love videos with precise explanations.
But I think he do it purposely so that even a person who is not so much good can understand the intuition.
And I think nowdays most of the people get that much basic understanding by solving basic problems.