By far the most clear explanation I've seen thank you!!
@umarfarooqshaik25044 ай бұрын
Nice explanation buddy,you have explained very well 👍👍👍
@KENTOSI2 ай бұрын
Hey thanks for the solution, but is the worst case really n^2? Seems more like it would be n^4. Imagine a large grid of all 1s. You'll immediately enter the first tile and do a dfs across all tiles (n^2). But then when you exit the function you're still needing to loop across every time even though you've already covered it. Am I missing something here?
@dhanniekristanto8 ай бұрын
after few similar 2D traversing case, I've finally have a better understanding of the dfs algorithm and this video helped a lot. thanks
@CodeCreated7 ай бұрын
excellent explaination, you deserve more followers, I have my google interview 2 days later, wish me luck fam