Sliding Window Technique

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

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

  • @michaelwirtzfeld7847
    @michaelwirtzfeld7847 Год назад +4

    Clear and concise. Thank you for teaching me these techniques.

  • @pearljam4ever215
    @pearljam4ever215 3 месяца назад +2

    I really like your videos keep up the good work♥

  • @akhilbabu6337
    @akhilbabu6337 Год назад +3

    Nice explanation 👌

  • @SammYLightfooD
    @SammYLightfooD 7 дней назад

    Nice explanation. But now I actually wonder if there are cases where the second, dynamic routine misses possible solutions.

    • @profound.academy
      @profound.academy  4 дня назад

      That's a great question. First, you need to make sure the problem can actually be solved using the sliding window technique. Sometimes the solution involves dynamic programming or other approaches and is not solvable with sliding window.
      Once you know the problem is solvable using the sliding window technique, you need to figure out an update procedure where you move from the previous segment of elements to the new one. This usually depends on the problem but in most cases you can increment one side 1 by 1 and adjust the other side with a while loop. That will make sure you don't miss any possible solutions.

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

    Thank you so much

  • @user-ll6rz5ln5c
    @user-ll6rz5ln5c 15 дней назад

    great exokanatio

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

    🤩🤩