This guy should be a youtube celebrity! People like him who share knowledge should be made famous.
@jackzhu64824 жыл бұрын
can't agree more, very well explanation!
@kingdey91364 жыл бұрын
he is a celebrity already
@sarvodaykumar27233 жыл бұрын
Must be
@Photon79086 жыл бұрын
I guess one minor point that I couldn't find in his video is this: (m+k) = integer*l -> this means, if you have p at the kth node and q at the start, by the time q travels m+k nodes from the start, p will finish one complete revolution on that loop. i.e., p and q will coincide at the kth node again. But if q only travels m nodes, p has travelled only (integer*l)- k nodes as well. So if p started at the kth node, and q at the start, they will meet at the start of the loop. (I hope this makes sense as it does in my head lol) Thanks for the video Vivek!
@vaibhavrbs5 жыл бұрын
``But if q only travels m nodes, p has travelled only (integer*l)- k nodes as well. So if p started at the kth node, and q at the start, they will meet at the start of the loop.`` can you explain this part again please, this is not clear to me,
@untwaddle5 жыл бұрын
@@vaibhavrbs p has already made k steps from the start of loop so to reach the start point again, it should travel (int * l) - k. it equals that q will make only m steps to reach the start point. other words, we had equation: m + k = int * l and then we subtract k from both sides. equation is still correct, now q will make m steps to reach the start point and at this place it will meet p. (p made (int*l)-k steps)
@sadmansakib0074 жыл бұрын
You are absolutely right. Something was missing in that video but THAT"s the main point!
@mhp3bozis4 жыл бұрын
Honestly think THIS should be the main focus, thanks for pointing out
@kaustavgalacticos4 жыл бұрын
You missed one minor key point as well, ASSUMING q is equal to p after q starts from 0 and p starts from k, and *your rest of the logic*.
@pankaj_20246 жыл бұрын
worth spending 24 minutes , good work.
@ashwanigupta54124 жыл бұрын
Hi Vivekanand sir, can't thank you enough for making this video. I have seen almost half a dozen videos on this online and after this I can understand the logic behind it fully. Worth spending 24 minutes. Kudos to you!
@robb19314 жыл бұрын
Finally, there's a video that helps me understand this algorithm. Thanks a lot!
@rehaanredkar14894 жыл бұрын
this man is unbelievable , the way he explains is just mind blowing
@leolin54794 жыл бұрын
You really save me from struggling with the textbooks and any other recourses I could find, thanks !
@KM-star5 жыл бұрын
OMG! This is the 1st video I am watching of this person and I am in love with his way of explaining things! I hope the rest of his videos are equally good. I can now recollect some friend recommending this person's videos. @Vivekanand ...You definitely have a fan base!
@Dontpushyour_luck2 ай бұрын
best video. I never understood this algorithm's proof properly but this was an excellent explanation
@da_sci38393 жыл бұрын
1. Best explanation I've found to describe this! No other explanation made sense. 2. I love the way you say "loop" XD.
@algorithmimplementer4153 жыл бұрын
I am convinced that I understood the explanation. Thank you!
@intechshala59293 жыл бұрын
kyaa bataya hain aaapne jo koi na samgha saka aapne samgha diya bohot sahi
@___vandanagupta___4 жыл бұрын
your teaching style is amazing ! i dont know why u dont have million subs
@danielstatler954 Жыл бұрын
after a couple rewinds, i finally got it. i doubt i could ever come up with this algorithm on my own. good vid
@jeezz41283 жыл бұрын
I didn't see such a clr explanation ever .... keep going sir
@ananyaarya24653 жыл бұрын
Thank you so much
@saravanansarangan70355 жыл бұрын
I got same confusion after seen the solution on leetcode. How they meet eachother at the beginning of the cycle but now it is clear. Thanks Viveka you are great...
@kirthanasingh6353 жыл бұрын
Your Explanation is amazing Sir!! Keep making videos
@ngc35ster2 жыл бұрын
Thanks man, this is way more clear than the leetcode answer
@mariammohamed1762 жыл бұрын
Thanks, it is the best explanation I have seen so far
@caio-jl6qw3 жыл бұрын
WOW, very very VERY good explanations, thank u for these videos !!!!!!!!!!!!
@kbhoyi3 жыл бұрын
OMG - Such a beautiful explanation! I'm listening to Vivek Sir's video first time. I'm sure, I'm in for a treat when I will search for other videos of his teaching. Stay blessed Sir.
@rohitkumarvarma49523 жыл бұрын
Thanks, mann! Finally understood this concept clearly!
@ankitvishnoi86705 жыл бұрын
I really enjoy your videos and your videos are helping a lot of people as we. I recommended your channel to many of my colleague and college friends. Keep up the good work. ;)
@amitvaghela14564 жыл бұрын
Great simplified explanations.
@aterribleyoutuber90392 жыл бұрын
Thanks a lot! I was struggling to understand this at first!
@chrisdanan21832 жыл бұрын
Wonderful explanation - thank you very much.
@denys_kovpaka2 жыл бұрын
I like the way you explained this. Thank you a lot)
@SoumikNandi4 жыл бұрын
One Point to mention.!! Rather than saying that Distance of P traveled would be Double the Distance of Q because "P's speed is twice than that of Q" kind of makes it incorrect statement. What we can explain is Let's say they start their journey at time T = 0. Now when they meet the time elapsed would be equal (Why? Because the time frame is absolute. Doesn't matter how they move they will meet only when they are in the same position at the SAME TIME) So, we know S = D/T (Speed = Distance/Time which also means T = D/S), from the equation we can say Tp (Time taken for P to reach the meeting point) = Tq ( Time taken for Q to reach the meeting point) or (m + pl + k)/2 = (m+ql+k)/1 Now work up to get, ---> (m+k) = l * (p-2q) NOTE: Another thing worth noting is that (2q-p) is also an integer but it'll never take the form of (2q-p) (Why? Because the left-hand side has a dimension of length (scalar) and hence cannot be negative).. Now, why is that (2q-p) is likely to be negative? Because P's speed is greater than Q. So its likely that P would travel the loop more number of times than Q will Hence, p > q/2 --> (Why q/2 ? follows from the above discussion) Or, (p - 2q) > 0 but (q-2p) < 0 It was just a suggestion!. The explanation is wonderful. It's just a part where I felt needed a little bit more clarification
@shashankmehul024 жыл бұрын
Such wonderful explanation.Very helpful.
@lokeshjaliminche5 жыл бұрын
Good to see you after a long time! Great work. Good going!! :)
@remmargorpp4 жыл бұрын
Bestest explaination ever!
@liangchen82384 жыл бұрын
Best explanation I've seen so far!
@tushargarg37653 жыл бұрын
Thanks for such a Nice Explanation.
@konstantinrebrov6754 жыл бұрын
Indian professors are awesome!
@anubhavsinha80484 жыл бұрын
Very nice explanation!
@akki4u6 жыл бұрын
Your explanation is so good that makes learning easy. Great work my friend!
@jaibhambri68533 жыл бұрын
Very Nice Explanation
@omkar.at.office2 жыл бұрын
Awesome explanation! Thanks 🙏
@KhanSlayer6 жыл бұрын
Very clear and concise explanation. Nice work.
@secretman17873 жыл бұрын
Excellent explanation !!!
@columbiars7 жыл бұрын
Wow, excellent explanation dude! I was trying to figure out why this algorithm worked, and finally I found the right answer. Keep going this videos!
@moghalsalwar6803 Жыл бұрын
I feel bore even for 10mins video ..but I didn't feel bore this tym when I am seeing this particular video...Thank U Sir
@mp01575 жыл бұрын
This is the best video dealing with Floyd's Cycle Detection Algorithm out there! Vivekanand, hats off to you for making this explanation so simple and straightforward! Thank you :)
@robertr60544 жыл бұрын
Just a minor point. When you’re doing the difference step you can just look at (m+k)=L*P. 2q will always be 0, as for any sized loop q will never be able to complete a full rotation before p catches up to it. P will also never be able to skip over Q in a loop. You can look at the most favorable example, if q enter the loop as p has just skipped over it. Before q will be able to traverse the rest of the loop to make a full rotation p will already have done so and be equal to q.
@learningpool59183 жыл бұрын
This man is gold. But I like watching it at 1.75x speed
@ashishdukare13134 жыл бұрын
Awesome explanation Sir : )
@ayushsakure60982 жыл бұрын
Very well explained.
@loba89242 жыл бұрын
Thanks. Nice explanation
@arpitamandal64693 жыл бұрын
thanks for explaining it so well..
@jamesclark12074 жыл бұрын
Really excellent explanation - thank you
@mahipalsingh-yo4jt4 жыл бұрын
very well explained thank you..............................
@isaacc94873 жыл бұрын
This is very clear and detailed, thanks a lot.
@karanb20675 жыл бұрын
heroic explanation
@mangeshgupta56774 жыл бұрын
Great explaination thank you
@blackswordsman97456 жыл бұрын
Your videos are really helpful. Thanks a lot for making them :)
@DurgaShiva75744 жыл бұрын
you are seriously amazing bro...i love your knowledge and teaching way, keep up the good work..
@shubhamjadhav26564 жыл бұрын
very well explanation!
@adityasingh111565 жыл бұрын
Thanks Sir You make it understand in very simple way
@devtorch4 жыл бұрын
I am on my knees and have tears in my eyes :)
@jamietherooster7 жыл бұрын
You are very good, I am english but find your videos far clearer than any native english speaker's video's. How do you gain the knowledge of these algorithms ? do you have a book ? I purchased 'introduction to algorithms' but find it very technical and hard to understand.
@sharansrivatsa2105 жыл бұрын
Honestly, I think its just going through this book called CLRS and preparing by just looking at more and more problems and how to solve them If you go to leetcode.com and start solving I'm sure you will start to get an intuition Also, these are algorithms that are used and proved. Its a lot about just learning these. geeksforgeeks is a good resource too.
@rahulchudasama93634 жыл бұрын
Nice explanation ...
@mahesh233434 жыл бұрын
Boy is son of mother. Mother is mother of boy. Man is husband of mother. Mother is wife of man. You can go to Delhi from Punjab. You can also go to Punjab from Delhi!! This video could be easily completed 5-6 minutes earlier if he wasn't repeating everything so many times! But got the concept clear, so thanks. But please try to be a little faster than this. God bless youtube developers for creating speed control.
@blasttrash3 жыл бұрын
install video speed controller extension. it allows you to go beyond 2x speed.
@mahesh233433 жыл бұрын
@@blasttrash noted.
@davidtheprogrammer2 жыл бұрын
Thanks so much. I wish we could derive floyd's cycle algorithm instead of assuming it's correct and making the assumptions from there.
@vedvish39163 жыл бұрын
Really awesome explanations,thank you.........,If possible please makes a playlist on stacks and queue.
@vivekanandkhyade3 жыл бұрын
Sure.
@kishantiwari32214 жыл бұрын
Thank You sir!
@codestorywithMIK4 жыл бұрын
Let us suppose the length of the list which does not contain the loop be s, length of the loop be t and the ratio of fast_pointer_speed to slow_pointer_speed be k. Let the two pointers meet at a distance j from the start of the loop. So, the distance slow pointer travels = s + j. Distance the fast pointer travels = s + j + m * t (where m is the number of times the fast pointer has completed the loop). But, the fast pointer would also have traveled a distance k * (s + j) (k times the distance of the slow pointer). Therefore, we get k * (s + j) = s + j + m * t. s + j = (m / k-1)t. Hence, from the above equation, length the slow pointer travels is an integer multiple of the loop length. For greatest efficiency , (m / k-1) = 1 (the slow pointer shouldn't have traveled the loop more than once.) therefore , m = k - 1 => k = m + 1 Since m is the no.of times the fast pointer has completed the loop , m >= 1 . For greatest efficiency , m = 1. therefore k = 2. if we take a value of k > 2 , more the distance the two pointers would have to travel.
@bittuxoxo4 жыл бұрын
sir yur vvideos are the best..i really get to understand how yu teach good one sir .i will be hoping for a recursion video explain it in depth
@null-wp1le4 жыл бұрын
Thank you so much for this video.
@najimahmed89235 жыл бұрын
#suggession: Complexity analysis would make the series complete. Please do another video to do complexity analysis!!! Great analysis! Thanks much!
@truthprevails8994 жыл бұрын
Thanks for the explanation!
@chakrapanisudarshan30277 жыл бұрын
Brilliant Explanation in simple words.....
@vivekanandkhyade7 жыл бұрын
Thanks Chakrapani.!
@asgheralishaik4 жыл бұрын
nice explannation.Thanks
@AMARSINGH-lj4rd4 жыл бұрын
great explanation , thanks you saved me viveka !!! :-)
@ShwetaNaganath7 жыл бұрын
Thank you. i was struggling with this since long.
@krisnadiputra934 жыл бұрын
This guy has just saved me from a sleepless night lol
@ankitvarmait6 жыл бұрын
Thank you for wonderful explanation
@azam1486 жыл бұрын
Very clear explanation!
@yys30823 жыл бұрын
Now, I know how it works. Thanks
@elizkotadia93507 жыл бұрын
Great Job !!! Crystal clear explanation !!
@kbhargavi44004 жыл бұрын
thank you, sir, you explained such a confusing concept very well! :)
@neeraj33negi4 жыл бұрын
Thanks, this is very detailed.
@glassanddiaphane4 жыл бұрын
This is awesome, this really helped me to finally understand it, thank you.
@ShivamKendre-fc3su4 жыл бұрын
What a explanation!!!
@anandkulkarni21117 жыл бұрын
doing good job!! excellent work keep them coming !!!
@vivekanandkhyade7 жыл бұрын
Thanks Anand..!
@apiltamang27675 жыл бұрын
props for setting up the video. I think it'd help your videos tremendously if you prepared your speech in advance on the idea you're talking about, and especially so for a convolved topic like this, rather than just give an impromptu performance. I think that would help the video be more concise, and perhaps even better explained. Regardless, first time learning this material and I think I understand it just fine. So you must have done it right, albeit with some effort :)
@yuhaodai57955 жыл бұрын
Nice explanation!
@gugliamo2 жыл бұрын
this was great, thank you!
@chienhsiang-hung2 жыл бұрын
you deserve more subs
@surendrapandey46602 жыл бұрын
This video doesn't show up in top searches of the topic. It makes me think youtube algo is not working properly
@dragosc82023 жыл бұрын
Thanks! YOU make my day
@pratiknaik2612 жыл бұрын
Thanks sir ek no!!💯💯
@abhishekshrm1006 жыл бұрын
very nice explanation
@farabikurmanshady84865 жыл бұрын
Clear explanation! Thanks!
@aynurmukhambetova17084 жыл бұрын
it finally became clear! thanks a lot!
@pratikghorpade68536 жыл бұрын
Thank you sir ..... Great explanation ....
@mohan-ri6ze3 жыл бұрын
Understood well
@LogEekumanAgination6 жыл бұрын
That was beautiful and made me happy thank you so much