Number of Islands | Java | LeetCode Solution 200

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 8

  • @mockmock-wv8gi
    @mockmock-wv8gi 7 месяцев назад +1

    By far the most clear explanation I've seen thank you!!

  • @KENTOSI
    @KENTOSI 6 месяцев назад

    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?

  • @umarfarooqshaik2504
    @umarfarooqshaik2504 8 месяцев назад +1

    Nice explanation buddy,you have explained very well 👍👍👍

  • @dhanniekristanto
    @dhanniekristanto Год назад

    after few similar 2D traversing case, I've finally have a better understanding of the dfs algorithm and this video helped a lot. thanks

  • @apyyymnmn3442
    @apyyymnmn3442 Год назад

    awesome, thanks buddy

  • @CodeCreated
    @CodeCreated 10 месяцев назад

    excellent explaination, you deserve more followers, I have my google interview 2 days later, wish me luck fam

  • @aliciak9084
    @aliciak9084 2 года назад

    very nice explanation!