You are the man. I spent all day doing this problem, but thanks to you, I actually understand it now. I can't tell you how much I appreciate you.
@darthvader_3 жыл бұрын
The best part about his explanation is he cuts to the chase, where others are engaged in explaining things he has already arrived at the coding part!
@KushalBhatia3 жыл бұрын
Thank you for patiently going through the whole grid instead of just saying so and so and moving to code. Amazing explanation
@AlgosWithMichael3 жыл бұрын
You're very welcome!
@fk1212763 жыл бұрын
Thank you Michael Muinos. Simply the best explainations, when I search I first see if I find a video from Michael Muinos, if not then from Tushar Roy, if not then whatever I get.
@RajeevKumar-xz2zr4 жыл бұрын
nicely done! before watching this I watced few other videos but couldn't get anything. 11 minutes of your video and everything was crystal clear.
@AlgosWithMichael4 жыл бұрын
Great to hear!
@stephandowless12973 жыл бұрын
this guy does such a great job of breaking complex problems down into simple steps. goes very in depth with examples as well. great job
@pradnyeshchoudhari93763 жыл бұрын
Best and easiest solution that I could ever find for the problem. Thank You!!
@mk-ec6px4 жыл бұрын
This is lit 🔥 please do more graph problems
@AlgosWithMichael4 жыл бұрын
Thanks dude, will do!
@lapujain4 жыл бұрын
Amazing. Your way of explanation is awesome. Keep up the good work.
@AlgosWithMichael4 жыл бұрын
I appreciate that, thank you!
@xeri_zarek3 жыл бұрын
Thanks for these videos! I've been looking all over for straightforward walkthroughs of algorithms + code for this type of problem, and yours are by far the most helpful I've found :) I did want to ask, why is the time complexity O(N^2)? since the loops you highlighted aren't nested, shouldn't it be O(2 * N) which is just O(N)? Or does the recursion in the getIslandSize method factor into the calculation?
@AlgosWithMichael3 жыл бұрын
Of course, thank you for watching! Looping over a grid will be n * m. If the columns and rows are the same, it is n2.
@user-Sjskakendjsiwjd3 жыл бұрын
I was initially a bit confused about this too because he said N is the number of items inside the input array, which then should be O(N).
@wendyzhou76183 жыл бұрын
super clear, right on the point. feel so lucky that I ran into this video, thanks!
@salmanuddin3779 Жыл бұрын
Such a great explanation , I was able to understand every bit of it. Thank you 💛
@codestorywithMIK3 жыл бұрын
Best explanation for this problem
@RishabhJain-hr6sz3 жыл бұрын
Perfectly explained. Thank you!
@chandandigumarthy96522 жыл бұрын
Amazing man ! your explanations made it soo easy to understand, thanks
@AlgosWithMichael2 жыл бұрын
Glad it helped!
@amritanshu833 жыл бұрын
Awesome explanation dude..so well explained. This is how solutions should be made. Keep up the good work!
@AlgosWithMichael3 жыл бұрын
Thanks, will do!
@kickradar33482 жыл бұрын
What an incredible solution! Thank you for this vid!
@shinansun94382 жыл бұрын
Great Video Michael. Very clear instructions
@hoyinli74623 жыл бұрын
watching your video saved me tons of time. THX!
@rakeshgupta89013 жыл бұрын
One of the best explanation I seen
@AlgosWithMichael3 жыл бұрын
Thank you!
@andrewthmas3 жыл бұрын
Thanks man. You understand what you are doing.
@AlgosWithMichael3 жыл бұрын
I appreciate that!
@Dinesh-ti6ql3 жыл бұрын
Most satisfying code ever watched😌 keep up the work dude✌
@AlgosWithMichael3 жыл бұрын
Thank you, will do!
@leowu50582 жыл бұрын
thank you for making all these great videos for us!
@Obligedcartoon2 жыл бұрын
bloody brilliant mate
@justgame55082 жыл бұрын
With some of these hard probables you can get trapped down rabbit holes, trying to solve the problem when you don t fully understand the question, a pen and paper or white board makes them so much easier you can draw things out and quickly see and issues with logic you may otherwise had assumed was sound
@mengjiasings12783 жыл бұрын
I was trying to submit this LC but couldn't get anything. You saved my day:)
@sara1khan1573 жыл бұрын
nice explanation . one doubt : if no of rows = n , no of cols = n , then getIslandSize -- is dfs call --- it will take O (n^2) which is equal to no of nodes traversed _ outer loop is also n^2 so total time complexity is O (n^4) Please correct me if I misunderstood Thanks
@sara1khan1573 жыл бұрын
got it please ignore the question :)
@evanliu61583 жыл бұрын
Cool! Your explanation cured my panic.
@AlgosWithMichael3 жыл бұрын
Nice!
@AnuragBaidyanath4 жыл бұрын
GG Michael! Clear explanation. :)
@AlgosWithMichael4 жыл бұрын
Glad it was helpful!
@shruthib33662 жыл бұрын
This algo literally blew my mind!
@AlgosWithMichael2 жыл бұрын
Haha yeah it is pretty crazy
@NithinMWarrier3 жыл бұрын
Thanks Michael, you explained very clearly with time and space complexity. One suggestion is to use proper variable names eg. instead of x, y, newRow, newColumn would be better, good job, keep going bro..
@AlgosWithMichael3 жыл бұрын
Great suggestion!
@nehashinde60172 жыл бұрын
You made it so easy!!!! Thank you so much!
@plvshygirl3 жыл бұрын
Awesome explanation, thank you!
@sagarsrivastava77282 жыл бұрын
Excellent Explanation!!!
@joann43693 жыл бұрын
how would you explain further why the space complexity os O(N^2)?
@supratim083 жыл бұрын
Great explanation bro ❤😌
@yy-gf7ze3 жыл бұрын
Michale is THE BEST.
@amritgupta57034 жыл бұрын
Please make similar videos of interview hot problems. Focus on algorithm like this video so that we C++ people can code easily in our way after getting algorithm.
@AlgosWithMichael4 жыл бұрын
Definitely will!
@jamsrandorjbatbayar36522 жыл бұрын
great explanation, much appreciated!
@AlgosWithMichael2 жыл бұрын
No problem!
@momoX77773 жыл бұрын
AMAZING EXPLAINATION!!!
@aayushsrivastava95693 жыл бұрын
Great explanation thanks !!
@roxanamoghbel91473 жыл бұрын
your videos are the best
@code74344 жыл бұрын
Really loved the explaination
@AlgosWithMichael4 жыл бұрын
Thank you, I'm glad it was helpful!
@saisriharshagriddaluru92613 жыл бұрын
why grid[i][j] > 1 is wrong there? can any one explain?
@ayonkar15344 жыл бұрын
Clear-cut Amazing
@AlgosWithMichael4 жыл бұрын
Thank you!
@anuragsekhri23153 жыл бұрын
well explained. thanks a lot
@FaustoOliveiraFilho3 жыл бұрын
Really good, man! Your didactics is incredible! You should get yourself a pen; it will make your drawings much easier and better than your mouse.
@AlgosWithMichael3 жыл бұрын
Thank you very much! Actually all of my newer videos are animated now, no more drawing with a mouse haha
@FaustoOliveiraFilho3 жыл бұрын
@@AlgosWithMichael I have 18 years of experience as a developer and now I'm practicing for an interview at Amazon. Your videos are really handy and your explanation comprehensive without being dull. Thank you for all your efforts!
@AlgosWithMichael3 жыл бұрын
No problem at all, I wish you the best with your interviews!
@code74344 жыл бұрын
Shortest bridge is similar problem please cover it