Sliding Window Technique | Google Coding Interview | Maximum Size SubArray Of Size K

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2025

ความคิดเห็น • 175

  • @JavaAidTutorials
    @JavaAidTutorials  5 ปีที่แล้ว +17

    *corrections*
    *Initialize the msum to Integer.MIN_VALUE because all the wsum may be negative and in that case the msum will never be updated by the wsum.*
    and
    in second method, *maxSum = Math.max(maxSum, windowSum);
    // added as a part of correction*
    public static int getMaxSumSubArrayOfSizeKM2(int[] A, int k) {
    int windowSum = 0, maxSum = Integer.MIN_VALUE;
    for (int i = 0; i < k; i++) {
    windowSum += A[i];
    }
    *maxSum = Math.max(maxSum, windowSum);
    // added as a part of correction*
    for (int windowEndIndex = k; windowEndIndex < A.length; windowEndIndex++) {
    windowSum += A[windowEndIndex] - A[windowEndIndex - k];
    maxSum = Math.max(maxSum, windowSum);
    }
    return maxSum;
    }

    • @himanshujain7014
      @himanshujain7014 5 ปีที่แล้ว +1

      Hello sir I am yr follower on Hacker rank ,I am also 6 star in Hacker rank but what to do next?

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว +4

      choose another platform like codechef or codeforces and get the 6 star their also.

    • @arunkumarvenkatesan1470
      @arunkumarvenkatesan1470 5 ปีที่แล้ว +1

      Hi,
      Actually your code not working for
      Following input
      For example int [] a={3,2,6,-1,4,5,-1,2}
      Exact output will be 11.
      But your code gives 9.
      Please change your code little bit following type modle
      Inside for loop
      Maxsum=math.max(winsum,maxsum);
      Winsum+=A[end]-A[end-k];
      Now its works fine
      Its will gives 11

    • @himanshujain7014
      @himanshujain7014 5 ปีที่แล้ว

      @@JavaAidTutorials yes I am doing at code chef there I am 2 star but I want to do job?
      Do you have any idea sir?

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว

      Did not get your query ? what idea you are talking about?

  • @robertsedgewick1266
    @robertsedgewick1266 4 ปีที่แล้ว +17

    Explaining tough problems with a dry explanation is easy and commonplace. Your work is brilliant because it makes tough problems seem easy to solve!

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว +2

      Thanks a lot for this feedback.
      If you find this channel helpful , please do share among your friends.

  • @aeon7748
    @aeon7748 2 ปีที่แล้ว

    I don't have an interview but was looking for a solution to a sliding window problem for my program, I thank you for your unique style in teaching It's very clear and easy, thank you.

  • @vigneshhendrix4447
    @vigneshhendrix4447 4 ปีที่แล้ว +2

    I've been Stuck in this particular problem . Have watched many videos. But I can't understand their way of explanation . But you just Nailed it. Keep doing videos in some special questions asked by huge product based companies please.

  • @pedestrian9287
    @pedestrian9287 5 ปีที่แล้ว +5

    Excellent video and terrific explanation! Best video on this topic on TH-cam!

  • @tentx652
    @tentx652 3 ปีที่แล้ว +1

    better understanding after watching the video...!! great going man

  • @saravananj3898
    @saravananj3898 3 ปีที่แล้ว

    trust me this the best video u can find in youtube in this topic

  • @aravinddesikamani
    @aravinddesikamani 5 ปีที่แล้ว +12

    I am sure that your subscribers count will grow with exponential complexity.. Keep the great work up😇

  • @samrey8134
    @samrey8134 3 ปีที่แล้ว +1

    After 2 weeks at this, I family got it. You are the best. Thank you so much

  • @vaibhavikhachane6225
    @vaibhavikhachane6225 2 ปีที่แล้ว +4

    In first for loop you need to write "maxSum =windowSum" because if we are getting the max in our first for loop than we need to return that maxSum;

  • @anushree3744
    @anushree3744 5 ปีที่แล้ว +4

    Happily subscribed. Great to see you discussing the patterns. Keep them coming.
    One request though, please site some problems that can be solved using the pattern. It will be an exercise to the viewer and will complete the learning cycle

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว

      Thank you for providing such a nice feedback. Sure will start including the problems also.

  • @nandakumarr9288
    @nandakumarr9288 4 ปีที่แล้ว

    I ve been finding solution fr this problem over 2 weeks and most of the contant related to this code are neither failed nor not explained correctly but this video is top notch and nailed perfectly.

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      Thanks for the awesome 🔥 feedback 😊

    • @nandakumarr9288
      @nandakumarr9288 4 ปีที่แล้ว

      @@JavaAidTutorials innor prblem ji i have to find index element of maximum value in this same prblm
      Like 4 5 4 summa = 13
      Index = 4
      Give me any idea or upload video related to finding index element of subarrray

  • @mongaslanguagetechnologies58
    @mongaslanguagetechnologies58 5 ปีที่แล้ว +6

    Thanks. This is a very common interview question.

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว +1

      yes, it is asked in many coding interview.

  • @kanchanjeswani2001
    @kanchanjeswani2001 4 ปีที่แล้ว +3

    Very nice video sir.Thank you so much..

  • @guess_d2s344
    @guess_d2s344 ปีที่แล้ว +1

    Thank you for explaining this concept in really nice way.
    Awesome 👍👍

  • @venpro8705
    @venpro8705 4 ปีที่แล้ว +1

    Your explanation is best than any other youtubers
    Thanks for ur explanation sir.
    Keep going
    From chittoor AP

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว +1

      So nice of you 😀
      If you find it useful, please do share with your friends as well. 🙏

  • @sureshgarine
    @sureshgarine 3 ปีที่แล้ว +1

    I can see your efforts in the present it in a more colorful and meaningful way with a nice presentation and communication. awesome job. I see many youtube, but never see one as you presented it very aesthetically. keep up the good work. your subscribers will increase sooner or later,

  • @law5
    @law5 8 หลายเดือนก่อน

    Your explanation on this topic was very clear. Keep it up!

  • @urunovtimes5816
    @urunovtimes5816 4 ปีที่แล้ว

    you are one of the my friend, from India. Oh my goodness. You are really clear explained in the wsa

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว +1

      Thank you :)
      If you like our content please share with others too

  • @prasaad44
    @prasaad44 4 ปีที่แล้ว +1

    Superb bro..... pls continue more on this....

  • @elgatito00
    @elgatito00 3 ปีที่แล้ว +2

    Great explanation 🤝

  • @vinothiniseenivasan1502
    @vinothiniseenivasan1502 2 ปีที่แล้ว +1

    thanks for crystal clear explanation.....

  • @madhutalaari
    @madhutalaari 4 ปีที่แล้ว +1

    your videos and explanations are making me feel that Datastructures and algorithms are actually not tough.. I understood this problem so easily ( may be this is an easy one :P).. Thankyou!!

  • @Spider-Man_67
    @Spider-Man_67 ปีที่แล้ว

    Man...your explanations are epic

  • @rajeshkumar-ty8nj
    @rajeshkumar-ty8nj 4 ปีที่แล้ว

    I have improved my coding skill through this channel.

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      Glad to hear that.😊
      If you find our channel helpful, please support us by sharing it.

  • @chrispure7461
    @chrispure7461 2 ปีที่แล้ว +1

    I love you man..great explanation.

  • @subhamjain707
    @subhamjain707 5 ปีที่แล้ว +1

    Great explanation..Just continue making such conceptual videos.Its going to help a lot.

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว

      Sure @Subham.
      If you find our channel helpful, please do share with your friends too.

  • @amitaher31
    @amitaher31 4 ปีที่แล้ว +1

    Very cool man, keep up the good work.. thanks for adding the correction.. I know many interviewers today look for these edge cases!

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      Thanks for the feedback 😊,
      If you find the tutorial helpful, please do share with your friends also.

  • @vikasmastud7005
    @vikasmastud7005 5 ปีที่แล้ว +1

    Very easy to understand and nice visual representation of sliding window techniq

  • @ashutoshsingh5568
    @ashutoshsingh5568 3 ปีที่แล้ว

    Awesome explanation bro. Keep teaching DSA.
    God bless you.

  • @arunkumarvenkatesan1470
    @arunkumarvenkatesan1470 5 ปีที่แล้ว +2

    Very nice explanation ...I want more this type of videos.i need to learn new ideas..your videos really superb..please share more videos..with explanation

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว

      Thanks for your feedback @arun.
      I am trying my best to teach you all.
      Stay tuned, for cool stuff.

  • @pzkpfwvii7090
    @pzkpfwvii7090 4 ปีที่แล้ว +1

    Thank you for your videos. Respect man! You're Waffentrager E100 in algorithm world!

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      Thanks 😊
      If you find this channel helpful, please support us by sharing it with your friends....🙏🙏

  • @kesharwani.prashant
    @kesharwani.prashant 3 ปีที่แล้ว

    You are an amazing teacher!!!

  • @mahmoudabdelsattar8860
    @mahmoudabdelsattar8860 2 ปีที่แล้ว

    please more around these please cover all (BS, TEES, DP.....) please -> ur way is easy

  • @saumyadeepdebnath6412
    @saumyadeepdebnath6412 3 ปีที่แล้ว

    Very nice explanation bhaiya... Thank you

  • @benmathew534
    @benmathew534 5 ปีที่แล้ว +2

    You can also use a deque. just add to the end of the list and remove from the front

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว +1

      yes, using dequeue we can solve this problem if size is fixed but it will not work for dynamic size array.

  • @geetusharma3923
    @geetusharma3923 4 ปีที่แล้ว +1

    Very nice explanation . Thanks for valuable content ❤️👍 all the best

  • @xotic37
    @xotic37 3 ปีที่แล้ว

    Great sir great great great I will Sher my friend your chanel link thank so mush sir really Good

  • @pradeepjagtap7220
    @pradeepjagtap7220 5 ปีที่แล้ว +2

    You are awesome! Thank you very much.

  • @shivajunna
    @shivajunna 5 ปีที่แล้ว +2

    Nice explanation !!

  • @frozen_tortus
    @frozen_tortus 4 ปีที่แล้ว +1

    Very nicely explained. This looks like dynamic programming.

  • @pritammishra9850
    @pritammishra9850 4 ปีที่แล้ว +1

    Amazing explanation

  • @apnasid794
    @apnasid794 3 ปีที่แล้ว

    Good work sir keep it.👍

  • @zavier3436
    @zavier3436 3 ปีที่แล้ว +1

    Just awesome ❤️

  • @akrammohammed1167
    @akrammohammed1167 4 ปีที่แล้ว +1

    Great explanation thanks for the wonderful video!

  • @dipakvyawahare
    @dipakvyawahare 3 ปีที่แล้ว

    Best explanation!! thanks

  • @anshpandey14325
    @anshpandey14325 ปีที่แล้ว +1

    GOOD EXPLANATION

  • @Roy-zt7sl
    @Roy-zt7sl 4 ปีที่แล้ว

    Excellent presentation & explanation

  • @dheerajkushwaha1657
    @dheerajkushwaha1657 5 ปีที่แล้ว +2

    Nice explanation

  • @venpro8705
    @venpro8705 4 ปีที่แล้ว +1

    Super bro👍

  • @randomlyrandom7002
    @randomlyrandom7002 4 ปีที่แล้ว +1

    Great video sir!

  • @ishitaanand4283
    @ishitaanand4283 4 ปีที่แล้ว +1

    It really helped me a lot

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว +1

      thank you. if you find it helpful, please do share with your friends as well.

    • @ishitaanand4283
      @ishitaanand4283 4 ปีที่แล้ว

      @@JavaAidTutorials sure Sir

  • @anupamachanamolu2678
    @anupamachanamolu2678 2 ปีที่แล้ว

    Great explanation.

  • @architpandita790
    @architpandita790 4 ปีที่แล้ว +1

    Nice Approach

  • @benneal8224
    @benneal8224 4 ปีที่แล้ว

    Awesome explanation! Thanks for putting these up as they are very beneficial.

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      Glad you like them!
      If you find it useful, please do share with other too.

  • @TridibSamanta
    @TridibSamanta 4 ปีที่แล้ว

    Awesome explanation ! Keep up the good work :)

  • @abhinavvgoyall
    @abhinavvgoyall 2 ปีที่แล้ว

    Best explanation!

  • @senthilkumaran5317
    @senthilkumaran5317 5 ปีที่แล้ว

    Great explanation with visuals . Subscribed

  • @manojprabhu5641
    @manojprabhu5641 3 ปีที่แล้ว

    very usefull :)
    tq bro.

  • @musadhk
    @musadhk 3 ปีที่แล้ว +1

    nicely explained

  • @vanngaonguyen9348
    @vanngaonguyen9348 4 ปีที่แล้ว +1

    great explanation

  • @prakashurkude4044
    @prakashurkude4044 ปีที่แล้ว +1

    it's easy to search with question number, so please add question number too in video title.

  • @mayurravindra9433
    @mayurravindra9433 3 ปีที่แล้ว +1

    very helpful!

  • @hellofriend3091
    @hellofriend3091 3 ปีที่แล้ว

    Thank you sir ❤️

  • @kinneravijay617
    @kinneravijay617 2 ปีที่แล้ว

    I think you should assign windows sum to maxsum befor the 2 for loop that's the correct apporch, because I first four is the maxsum them we are getting wrong answer

  • @rajgupta6738
    @rajgupta6738 2 ปีที่แล้ว +1

    you are amazing

  • @nileshmishra3192
    @nileshmishra3192 4 ปีที่แล้ว

    Let's consider the eg.
    int[] arr = {2,1,1,-5}; --> our code here will give answer as 2 & now 3 because we are not comparing windowSum found in first loop with the first occurrence of windowSum in the second loop.
    We have to add:
    if(maxSum>count)
    return maxSum;
    else return count; //copying windowSum value from the first loop in the count
    PS: I may be wrong, just learning! sorry if I'm :)

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว +1

      Hi @Nilesh, please have a look on pinnned comment to get the answer for your query.

  • @vinothkannans1910
    @vinothkannans1910 4 ปีที่แล้ว

    Awesome explanation 👍. I got clear clarity. Could you please tell me what is the trick and tips to solve any kind of arrays problems.l mean from easy to complex kind of array problems.

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว +1

      Will upload soon, till then keep learning keep coding 😊

    • @vinothkannans1910
      @vinothkannans1910 4 ปีที่แล้ว

      @@JavaAidTutorials Thanks a lot 😊

  • @Abhijeetkumar-jr8fq
    @Abhijeetkumar-jr8fq 4 ปีที่แล้ว

    in sliding window technique code it is leaving the first element of the array
    int [] a={44,45,1,2,3};
    then the sum will be 45+1+2+3=51 but it should be 92
    because you are not considering the first iteration addition for 0 to k-1 that is 92 uncompared

    • @Abhijeetkumar-jr8fq
      @Abhijeetkumar-jr8fq 4 ปีที่แล้ว

      between both loop put
      maxSum=windowSum

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      We have done the correction in our code and mentioned the same in a pinned comment, please follow the pinned comment and let us know if still there is any doubt.

  • @RakeshKumar-en1uq
    @RakeshKumar-en1uq 2 ปีที่แล้ว

    Please try to put video based more DSA

  • @UECAshutoshKumar
    @UECAshutoshKumar ปีที่แล้ว +1

    Thank you sir

  • @aishwaryaporwal2321
    @aishwaryaporwal2321 3 ปีที่แล้ว

    Plss sir also make a vedio on Dutch national flag algorithm technique

  • @rohancombay2689
    @rohancombay2689 ปีที่แล้ว +1

    Damn Good man

  • @sohampatra1207
    @sohampatra1207 4 ปีที่แล้ว

    sir can you make video on the largest rectangle&hackerrank solutions on stack game problem

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      I need some time to upload more content.
      Due to lockdown, i am stuck without my laptop 😞

  • @DTWK
    @DTWK 3 ปีที่แล้ว +1

    There is a bug in your optimized solution. You are not storing the sum for the initial window in the max sum. So when doing math.max your first value in the array is not included in the computation.

    • @Legenderboy123
      @Legenderboy123 3 หลายเดือนก่อน

      If the (array.length == k), then it will return 0 as maxSum.
      So, after first for loop, set
      maxSum = windowSum;

  • @shashwatshukla3289
    @shashwatshukla3289 3 ปีที่แล้ว

    Sir ,is prefix sum algorithm a good approach here?

  • @navinchainani4721
    @navinchainani4721 3 ปีที่แล้ว

    Sir instead of windowsum +=A[end]-A[end-k] we can write windowsum+=A[end]-k

  • @Mike-mw1fu
    @Mike-mw1fu 5 ปีที่แล้ว +1

    Very nice explanation.I love it
    Let’s say if the array size is equal to k , the max sum should be sum of array elements.
    It’s just need a little change for your code, Sir.
    Thanks a lot

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว +1

      thank you @study student.
      As this is the corner case and the expectation was to explain the technique so I avoided all validations and corner cases so that it will be easy to grasp the core logic.
      but I agree with you, to handle this scenario,you need to put an additional check before the second loop and done.

  • @jlecampana
    @jlecampana 5 ปีที่แล้ว +1

    Hello there! I always thought that LeetCode problem #560 could be solved using this technique, but as it turns out I was wrong. Could you please explain Why the Sliding Window Technique does not work for such a case? Thank you, and Great video BTW

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว +1

      I have just reviewed the leetcode problem and found there is a slight difference in both problem statement.
      they are asking to return "total number of continuous subarrays whose sum is maximum" instead of maximum sum.
      Here is the leetcode problem statement for your reference.
      "Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k."

  • @rishurajan8080
    @rishurajan8080 4 ปีที่แล้ว +2

    Hello sir,please may ypu provide source code in c++ as well

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว +1

      Currently source code is provided only in java language but we are planning to provide it in multiple languages which needs some investment. we will add all feature as we grow. so please share our channel with your friends.It will help us to reach our goal sooner.
      Mean while you can check out comments on the video ,as lot of people paste their solution in multiple language.

  • @hemaladani4510
    @hemaladani4510 หลายเดือนก่อน

    Can someone please send link to this problem? Leetcode or hackerrank or something else?

  • @156sparsh7
    @156sparsh7 4 ปีที่แล้ว +1

    Thanks

  • @2cool238
    @2cool238 3 ปีที่แล้ว

    why does prefix sum not work for this problem

  • @ccarnagee7867
    @ccarnagee7867 4 ปีที่แล้ว

    please suggest some problems for practicing these algorithms...Codeforces.leetcode,hackerrank any platform..The more the better....

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      will recommend leetcode and hackerrank.
      To know more, what to use follow below answer-
      www.quora.com/Which-one-is-better-HackerRank-or-LeetCode/answer/Kanahaiya-Gupta-2

  • @amitghosh2183
    @amitghosh2183 2 ปีที่แล้ว

    But array is not sorted. Then how can be answer 13 why not(9+7+3+2)=21.

  • @amarchoubey5615
    @amarchoubey5615 3 ปีที่แล้ว

    Super

  • @ztrixx3280
    @ztrixx3280 4 ปีที่แล้ว

    Arr = [9,6,6,1,2,3,3,5,7,5]
    K = 3
    If maxSum window is the first window(k elements)...then this technique gives a wrong answer
    It returns 17 instead of 21
    To correct it..the Math.Max line should be about the windowSum formula..

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      Thanks for pointing this out but i have already mentioned the corrections in my first comment.
      Have a look and let me know if i missed something.

  • @iezioaudi22
    @iezioaudi22 10 หลายเดือนก่อน

    Thanks!!!!!!

  • @swapnilbmkjs7610
    @swapnilbmkjs7610 2 ปีที่แล้ว +1

    There is a error in this problem.... Just write maxsum=windowssum after 1 st for loop then it will work currently.... If u don't believe me... Just put 1st elements of array ie 1 after 4th element of array ie 7 (9,-1,-2,7,1,3,-1,2) u will got output as 10.... Thanks me later

  • @akhilchowdary3161
    @akhilchowdary3161 5 ปีที่แล้ว

    hey a small intimation that u are not comparing the first k values with maximum value

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว +1

      yes , we have missed it seems, just added as a part of correction in my pinned comment.
      Thanks for pointing it out..:)

  • @shivamshah431
    @shivamshah431 5 ปีที่แล้ว +2

    Correction: Initialize the msum to Integer.MIN_VALUE because all the wsum may be negative and in that case the msum will never be updated by the wsum.

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว +1

      thanks shivam for pointing this out. I have updated my code and mentioned the same in pinned comment.
      Even it was not necessary but its always good to handle such cases.

  • @pramitis2645
    @pramitis2645 4 ปีที่แล้ว

    May I connect you in faceboook Or anywhere else I need help regarding hackerrank questions

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      sure but don't expect from us to solve hackerrank problems for your assignment or coding interview.. 😀

  • @start1learn-n171
    @start1learn-n171 7 หลายเดือนก่อน

    Tq

  • @anamikaahmed4887
    @anamikaahmed4887 4 ปีที่แล้ว +2

    There are problems with this code.
    1) You are not comparing the first iteration (sum) of the sliding window with maxSum.
    2) minimum should be set to Integer.MIN_VALUE.
    The explanation is great but I think you should have mentioned these corrections in the description box.

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      Thanks for your detailed feedback.
      we have already added these corrections long back in our pinned comment and git hub code😊.

  • @dhaanumalavan1968
    @dhaanumalavan1968 2 ปีที่แล้ว

    👌👌

  • @piotrekkrakowiak5060
    @piotrekkrakowiak5060 3 ปีที่แล้ว

    For God sake add subtitles or slow down when you speak

  • @vamsibavanari7409
    @vamsibavanari7409 4 ปีที่แล้ว

    For the input {7,8,1,3,1,4,1,0}, the max should be returned as 16, but because of the below code, it is returning as 12.
    Because for the first iteration, we are not assigning the max. value;
    the maxSum should be the first stmt in the below loop.
    for(int j=k;j

    • @JavaAidTutorials
      @JavaAidTutorials  4 ปีที่แล้ว

      this problem has been already addressed and i have pinged my comment on top. please have a look.

  • @pramitis2645
    @pramitis2645 4 ปีที่แล้ว

    Hello

  • @VerzapierZyGaming
    @VerzapierZyGaming 5 ปีที่แล้ว

    this cannot be a coding interview problem for google, unless they ask you to do it in DP.. this is basically clickbait

    • @JavaAidTutorials
      @JavaAidTutorials  5 ปีที่แล้ว

      If you think this problem is easy and Google always ask hard questions, you can visit this link to clear your doubt.
      Even the Two sum problem also asked in google interview.
      th-cam.com/video/XKu_SEDAykw/w-d-xo.html

  • @jay-rathod-01
    @jay-rathod-01 4 ปีที่แล้ว +1

    Don't click this😂