523. Continuous Subarray Sum | Prefix Sums | Hash Map

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

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

  • @ARYANMITTAL
    @ARYANMITTAL  5 месяцев назад +1

    When are you ready for FAANG (Don't repeat these mistakes) - ruclips.net/video/h71X1VMo5J0/видео.html

  • @adnanemezrag3809
    @adnanemezrag3809 5 дней назад

    Bro you really explained it very well. Thank you very much.

  • @italk-gj5kk
    @italk-gj5kk 5 месяцев назад +6

    thanks bro for providing understable solution in 10-20 mins everyday... helps a lot

  • @AnilKumar-d6y1l
    @AnilKumar-d6y1l 5 месяцев назад

    This Channel Deserves a lot of subscribers , but don't know , why it is on 41K , the quality of content is top notch in a short video length , without a lag , lots of respect brother.

  • @Aditya-tz5pi
    @Aditya-tz5pi 5 месяцев назад +1

    I tried the recursive and backtracking method but was able to pass only 94/99 testcases after that i thought for the hashing method but was clueless so landed here to know the intuition and was surprised to see the way you have explained it .

  • @youtubeuserlovesyoutube2207
    @youtubeuserlovesyoutube2207 5 месяцев назад

    love you aryan, always love your intuitive solutions where you are not just explaining the code but arriving there ...

  • @benzene___
    @benzene___ 5 месяцев назад

    too good

  • @IK-xk7ex
    @IK-xk7ex 5 месяцев назад

    The brute force approach won't work here because `nums.count == 1e9`, and we will receive TLE because of `n^2` time complexity.

    • @lavanya_m01
      @lavanya_m01 5 месяцев назад

      this solution is not brute force btw

  • @ajayc815
    @ajayc815 5 месяцев назад

    ✌✌✌✌

  • @SIDDHANTJAIN-tx7bo
    @SIDDHANTJAIN-tx7bo 5 месяцев назад

    i stored the remainder inside the map and then checked

  • @HarizibamV
    @HarizibamV 5 месяцев назад

    Hi, Kindly share codeforce contest solution.

    • @ARYANMITTAL
      @ARYANMITTAL  5 месяцев назад +6

      Yes sir, i really really wanted too, but truely speaking codeforces contests are mostly on weekdays at 8pm & i come back from office at 11pm, thus even if i plan to start it, it will be impossible to continue, as i can't cover everything in 1 weekend (and that too, it will be too late) 🥺🥹

    • @dharyajasuja11
      @dharyajasuja11 5 месяцев назад

      @@ARYANMITTAL can you please share good resources for solutions instead of tutorial because its hard get intuition from tutorials of cf

  • @Samtoosoon
    @Samtoosoon 5 месяцев назад

    Cont subarray sum

  • @NishantVerma-fj6sp
    @NishantVerma-fj6sp 5 месяцев назад

    Hi, Kindly check this out also
    class Solution {
    public:
    bool checkSubarraySum(vector& nums, int k) {
    int n = nums.size(), prefixSum=0;
    unordered_map mp;
    mp[0]=0;
    for(int i =0;i

  • @abhiiiman
    @abhiiiman 5 месяцев назад +4

    Worst explanation

    • @ITACHIUCHIHA-dr8sz
      @ITACHIUCHIHA-dr8sz 5 месяцев назад +1

      skill issue

    • @jevinmakwana6811
      @jevinmakwana6811 5 месяцев назад +2

      bro don't take me wrong but if you practice dsa daily, at least your intuition regarding the topic is matched then no explanation will be Bouncer anymore. jump to solution only after getting little intuition else watch the video 2-3 times until you get it. Ya He's a bit level ahead of us so he has missed some basic explanations :)

    • @abhiiiman
      @abhiiiman 5 месяцев назад +2

      @@jevinmakwana6811 thanks for this suggestion man, I do appreciate it.
      Also I've solved this on my own using prefix sum got 93/99 test case passed at first 10 mins of solving but I was missing the corner cases and got to know about the map approach too which is really helpful but the way this guy has explained I didn't liked it at all tbh that's why I felt commenting generally I don't do it often.