Number of Subsequences That Satisfy the Given Sum Condition (LeetCode)

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

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

  • @2radix774
    @2radix774 Год назад +1

    At first I didnt understand those exponents, why for example for nums = [2, 3, 4, 4, 6 ,7] and target =12 you add 32 to the count at first iteration
    but now I understand that point is that since 2+7 is less than 12, you take number of all possible subsequences of [3, 4, 4, 6 ,7] (including the empty set) and then you add elemnt "2" to each of them, which makes the empty set now equal to [2], and you are guarenteed that each of the subsequences has the smallest elemnt of 2 and biggest at most 7 (there is 32 of them)
    really helpfull video, thank you,

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

    thank you very much!! Bhaiya.

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

    Really great explanation!! Thank you

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

    Liked the precomputation part and loved the explanation. Small, short and crisp
    Thankyou

  • @paritoshkulk
    @paritoshkulk 4 года назад +2

    Saved my interview! Thanks man!

  • @amitchaudhary7745
    @amitchaudhary7745 2 года назад +1

    best explanation available on yt

  • @maneeshapanu
    @maneeshapanu Год назад +1

    Very beautifully explained sir !!

  • @yuhaokong
    @yuhaokong 4 года назад +1

    really like the explanation on the permutation part, good job!

    • @JyotinderSingh
      @JyotinderSingh  4 года назад

      Thank you! I'm glad this helped! Be sure to subscribe for more content :D

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

    Thank you

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

    Solid ans superb explanation!

  • @17_it_sidhartsingh58
    @17_it_sidhartsingh58 Год назад

    I am missing something, would anyone explain...
    Did you count the '8', the last element from the explained example? after decreasing the right pointer ...
    We need to count it as one subsequence of sum

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

      bro, min element is 8 and the max element is 8, 8+8 is greater than 10, and we dont take it.