Sliding Window Algorithm - Variable Length + Fixed Length - DSA Course in Python Lecture 13

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

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

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

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

  • @Shiva-wp2nq
    @Shiva-wp2nq 4 месяца назад +9

    Hey Greg, you're content and way of explaining make me feel like DSA is easy

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

      Glad to hear it!

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

    Greg just keep making these videos man you are just awesome ❤

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

      Glad to hear it!

  • @mystikyogi
    @mystikyogi 2 месяца назад +1

    Amazing explanation. Thanks!

  • @naveentarakaturi9930
    @naveentarakaturi9930 4 месяца назад +1

    you are so talented.

  • @mrsengeel
    @mrsengeel 3 месяца назад +1

    Great teaching Greg but i have a question, what is the need of comparing the max value of w to longest because there is nowhere in the code for Variable Lenght Sliding Window is longest incremented from 0. So can we just give longest = w in replace of finding the max between them

  • @kdiffin
    @kdiffin 6 дней назад

    Thanks ❤

  • @bigk9000
    @bigk9000 2 месяца назад +1

    What is the name of the tool you use to draw stuff out?

  • @carsworld3433
    @carsworld3433 4 месяца назад +1

    Hey in first problem why did we specifically used set, I tried it with a list and it was actually better since list are more easier to work with

    • @sinanakcali8008
      @sinanakcali8008 9 дней назад +1

      That would make the time complexity of your solution O(n^2). When you try to do a search in a list it is O(n), whereas search in a set is O(1)

  • @creativeusername4400
    @creativeusername4400 4 месяца назад +7

    it feels illegal to watch because of its simplicity with DSA

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

    what about different sliding windows types/patterns: fixed length, caterpillar, shrinking /expending rules ?

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

      Did you watch the video?

    • @pjpodx
      @pjpodx 4 месяца назад +1

      ​@@GregHogg Yes, I think I was expecting more like recipe/template/framework for solving all sliding window problems after reading title, not just solving 2 leetcode sliding window tasks, Sorry.

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

      @@pjpodx This is the recipe. There's 2 common sliding window types, I say what they are, and explain how to solve an example for each. Not sure what else there is, am I missing something?

  • @Fam-m4i
    @Fam-m4i 4 месяца назад

    First😊