Rotting Oranges - Leetcode 994 - Graphs (Python)

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

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

  • @GregHogg
    @GregHogg  3 месяца назад

    Master Data Structures & Algorithms For FREE at AlgoMap.io!

  • @ajitsdeshpande
    @ajitsdeshpande 6 месяцев назад +3

    Hi Greg, thank you for all the efforts in explaining and coding the solutions which have helped me learn. All the Best!👍

    • @GregHogg
      @GregHogg  6 месяцев назад +1

      Wow! Thank you so much! That's so nice of you :) 🥰

  • @clara-wj3vl
    @clara-wj3vl 2 месяца назад

    very well explained! (I appreciate particularly the clear illustration 😍

  • @shreehari2589
    @shreehari2589 6 месяцев назад +3

    What is the name of the paint tool you are using? I need it to practice

  • @ПавелКуликов-ж9н
    @ПавелКуликов-ж9н 6 месяцев назад +1

    What is the reason to use another for loop on 23 line? You have already have while q: ... I think you do not need this loop and q_size var, is not it? You just popleft element and make 25 line loop without 23 line

    • @GregHogg
      @GregHogg  6 месяцев назад +1

      Then how would you organize it by rounds?

    • @ПавелКуликов-ж9н
      @ПавелКуликов-ж9н 6 месяцев назад +1

      Got you! Thank you for video and answer to my question. I’ve forgotten about minutes we need :))

    • @GregHogg
      @GregHogg  6 месяцев назад +1

      @@ПавелКуликов-ж9н You're very welcome :)

  • @GarouNguyen
    @GarouNguyen 4 месяца назад

    Bro how you calculate minute

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

    Hello sir. Sir I am not good at maths so can I learn and practice dsa and actually become good at it??

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

      Yeah you don't really need math

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

      @@GregHogg thank you sir I just really want to become like you in dsa

  • @GarouNguyen
    @GarouNguyen 4 месяца назад

    Why you set minutes = -1 and what is q_size, just not use len q alone bro, I don't understand 😣😣

    • @Swifty1412
      @Swifty1412 Месяц назад

      Because the size of the queue will constantly be changing, by capturing the size in the variable you can make sure you only process the neighbors