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

  • @sus_tha_coder
    @sus_tha_coder Год назад +201

    Aggressive striver

  • @technicalteam3298
    @technicalteam3298 10 месяцев назад +81

    you are "The" best teacher In terms of explanation
    I have tried many RUclipsrs like Codehelp, kunal kushwaha but your way of explaining things is much better as you focus on approach not only on coding the things without visualizing possibilities
    may god bless you for helping many Tier 3 students like me for providing this premium content just for free!

    • @anshulgoel1940
      @anshulgoel1940 9 месяцев назад +1

      Series from Kunal are incomplete. Even after recent updates, its quite far from completion.

    • @albedo9617
      @albedo9617 Месяц назад +1

      Neetcode is pretty good

    • @rickk3300
      @rickk3300 15 дней назад

      @@albedo9617 yes

  • @341yes
    @341yes 10 месяцев назад +24

    This man is magic when comes to a certain set of problems!!!.... Simply, impressed by him! The explanation easily depicts how much hardwork he has put in! HandsOff to you sir!❤

  • @harshpanwar1550
    @harshpanwar1550 11 месяцев назад +9

    You win our hearts in every video, specially the hard problems by explaining them in such a beautiful and simple manner.
    Thank you for your enormous contributions toward the Coding Community❤

  • @AkshayGoel-of8ic
    @AkshayGoel-of8ic 11 месяцев назад +1

    I searched for aggressive cow solution and i got you THE BEST EXPLANATION

  • @elizabethr5161
    @elizabethr5161 Год назад +9

    Clearly Understood Striver. Thanks for this awesome series.

  • @himanshurane4847
    @himanshurane4847 8 месяцев назад +3

    I solved this question just after you explained the question, and this is because you explained previous questions so well, and this is the power of your teaching

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

    Understood! Super amazing explanation as always, thank you so so much for your continuous effort!!

  • @aaryanjavalekar7249
    @aaryanjavalekar7249 11 месяцев назад +2

    The best explanation for Aggressive Cows problem!

  • @user-ik3qu5uy5e
    @user-ik3qu5uy5e 4 месяца назад

    I am getting crazy with every next video full of excitement and respect for you. How easy , clean , structured the problem and its solution . Best part when the complete story ends with code same as the story we listen, we read it too by the code.

  • @venkatamurthy6022
    @venkatamurthy6022 11 месяцев назад +1

    Your explanation is so clear that even beginners can also understand easily.

  • @CodeMode9313
    @CodeMode9313 10 месяцев назад +1

    Habibi issme thoda mushkil hua samjne me but dimak lagai toh samaj aagai ....tusssi ek number kaam karta hai ...acchi bideo banaata hai

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

    coded optimal in one go , without seeing video 😀 . THANKS A LOT STRIVER FOR EVERYTHING

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

    13:24 like he says that range can be optimized. The more optimal lower bound for search space will be the Minimum(adjacent difference). Reason: Let's take array [100, 200, 240, 400, 800]. In this 40 would be the lower bound and not starting from 1. Because if you want to place minimum 2 cows (like question says). You cannot attain difference any lower than this in sorted array which is 40 in this case i.e. Minimum(adjacent difference)

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

    Understand everything
    Min Of Max pattern super duper clear

  • @rohakdebnath8985
    @rohakdebnath8985 6 месяцев назад

    Loved the video. I was stuck in this problem. You have a way with explanations, thanks Striver.

  • @sauravchandra10
    @sauravchandra10 Год назад +24

    Is binary search that easy, or is it the sriver effect? 😊

  • @lavanyam3224
    @lavanyam3224 3 месяца назад

    After reading the problem statement, I didn't even understand it. It is crystal clear after watching your explanation! Thanks Striver :)

  • @user-ti3bd8mp1w
    @user-ti3bd8mp1w 11 месяцев назад +1

    understood
    Thank you striver for such an amazing explanation

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

    UNDERSTOOD...Thank You So Much for this wonderful video.............🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @sxd6259
    @sxd6259 10 месяцев назад +3

    i think you should also optimise the check function a bit more by using lowerbound instead of linear search for the next cow stall index, great solution thought

  • @rickk3300
    @rickk3300 11 месяцев назад +17

    I solved this question without watching the video just because of the fact that I knew that binary search on answers is going to be applied here, but my question is that how the hell can someone come up with the binary search approach if he/she doesn't know that it is going to be solved using binary search. When I first read this question, the first thought that came to my mind was applying dp.

    • @utsavseth6573
      @utsavseth6573 10 месяцев назад

      That's the main problem bro.

    • @bishalkundu7592
      @bishalkundu7592 9 месяцев назад

      That's the thing which comes with practice. The more you practice, the more you will solve problems on different topics and you will be able to find patterns in it.

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

      hey @techmaniac2002 now it has been 8 months since you said this and i think you might have practiced many questions since then, and so i wanted to know if you can now find the pattern and say that this question is going to be solved by this approach. or are you still struggling

    • @rickk3300
      @rickk3300 3 месяца назад

      @@ronakraj Nope, I haven't practiced many questions on DSA since I got placed in the month of August 🙂 I practically left DSA/CP since then...

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

      @@ronakraj I think clear distinction between when to apply binary search or DP is that: whenever you observe that answer always lie between a fixed range, and you are getting an answer till a specific point and not getting any answer after a certain value (this is known as monotonic function) then for sure Binary Search can be applied. Whereas in DP, you will be asked to find the optimal answer (minimum or maximum, just like Binary Search) but the problem would be such that you HAVE TO explore all the answers and only after that determine optimal one, this is where recursion comes in which is used to explore all possibilities and finally overlapping subproblems in recursion are optimized using DP. But these things take time and practice.

  • @simransaini1227
    @simransaini1227 3 дня назад

    Understood !!!!! Grateful of you, Striver🙏

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

    best explanation and intuition

  • @Video-Notes
    @Video-Notes 2 месяца назад

    Best Explanation ...............
    Best Course on youtube

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

    Aggressive understood lol. Great explanation striver!

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

    Understood very good explanation than previous explanation

  • @52nevil36
    @52nevil36 9 месяцев назад +2

    Genereally i never do any comment to video but the guys was insane.. this made DSA too easy for mr (I feel slowly slowly DSA is cup of my v tea)

  • @PrajwalCoding
    @PrajwalCoding 6 месяцев назад

    Heyyy, Thanks for the polarity change explanation. I was shocked understanding the intution

  • @naveensingh596
    @naveensingh596 8 месяцев назад

    Understood...so simple explanation bhaiya💙

  • @krishnasharma-rn3sd
    @krishnasharma-rn3sd 3 дня назад

    clearly understood bro .awesome explanation!!!

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

    Thank you! Lots of gratitude 🌸

  • @abdulrhmanmagdy7591
    @abdulrhmanmagdy7591 11 месяцев назад

    Thank u so much, u are very helpful
    greeting from Egypt

  • @manavsingh5919
    @manavsingh5919 10 месяцев назад

    thank you striver understood everything 🙂

  • @nihaal4699
    @nihaal4699 3 месяца назад

    Bht hi badiya padaya bhai, maja agya

  • @Sahilsharma-sk5vr
    @Sahilsharma-sk5vr 15 дней назад

    your dedication . god bless you

  • @javabytharun
    @javabytharun 8 дней назад

    great explanation, easily understood...............

  • @sauravkumarjha6162
    @sauravkumarjha6162 9 месяцев назад

    amazing explanation as always striver bhaiya

  • @aniketwdubey
    @aniketwdubey 8 месяцев назад +2

    In the context of this problem, you could also start with low = 1 since it doesn't make sense to have two rooms at the exact same position. The only reason to start with 0 is to provide a clear lower bound for the binary search. The result wouldn't be affected either way since the binary search would quickly discard unfeasible distances, but starting from 1 would be more intuitive in this context.

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

      Ya you can write but it wont make any difference in the time taken... The change in time taken is less than 1ms

  • @dhruvmalik8052
    @dhruvmalik8052 11 месяцев назад

    great Explanation
    luv u brother

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

    Super Sir Understood Thankyou for this Lecture

  • @farheenahmed8286
    @farheenahmed8286 17 дней назад

    The best explanation for aggressive cows problem🙂

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

    yes yes, still watching and iked.. tysm

  • @hareshnayak7302
    @hareshnayak7302 3 месяца назад

    Understood,Thanks striver for this amazing video.

  • @shra1
    @shra1 11 месяцев назад

    Understood very well

  • @dipingrover1970
    @dipingrover1970 17 дней назад

    amazing explanation thanks a lot .😊

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

    Just amazing content , I was unable to understand the question but now i am able to solve it. 💌💌💌🤟

  • @Shunya_Advait
    @Shunya_Advait 10 месяцев назад

    Understood Sir, Thank you

  • @aruna5869
    @aruna5869 12 дней назад

    you are extradinary man!!💛💯

  • @samsmith3961
    @samsmith3961 10 месяцев назад +1

    since we have to min of max distance we'll have to find divide the distances as equal as possible , then choose the minimum

  • @ankitdhattarwal2286
    @ankitdhattarwal2286 11 месяцев назад

    Understood and Thank you

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

    superb explanation

  • @usmankhatri6836
    @usmankhatri6836 10 месяцев назад +1

    Striver! What's next after this amazing BS Playlist?

  • @MJBZG
    @MJBZG 3 дня назад

    amazing question!

  • @Musicuvakavi1823
    @Musicuvakavi1823 3 месяца назад

    Understood well Sir ... Thank you so much Striver Sir for making such an amazing video... After understanding the problem, I was able to solve without seeing the code Thanks a lot Sir

  • @priyankaranawat8373
    @priyankaranawat8373 22 дня назад +1

    Thank you soooooooo much 😁

  • @ritwik121
    @ritwik121 11 месяцев назад

    someone give him a oscar for the best explanation

  • @ayushagarwal5271
    @ayushagarwal5271 12 дней назад

    In the canweplace func, is it okay to do if(cntcows==cows) return true, rather than >= ?

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

    Bhaiya thanku for the course,but kab tk complete hoga?pls tell

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

    can we do it like this place one cow in start one cow at thee end and then think something like that??

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

    19:01 we are sorting as well. O(nlogn)

  • @joeljacob4685
    @joeljacob4685 8 месяцев назад

    Understood !! Beautifully explained

  • @PriyankaSingh-sl2wg
    @PriyankaSingh-sl2wg 8 месяцев назад

    Thank you sir.....❤️

  • @utsavseth6573
    @utsavseth6573 10 месяцев назад

    Well, That was lovely.

  • @alishashaikh3859
    @alishashaikh3859 9 месяцев назад +2

    Hello Striver,I am not able to solve the problems on my own what should i do?

  • @lakshmiprasanna7058
    @lakshmiprasanna7058 11 месяцев назад

    Understood 💯💯💯

  • @user-or5oz1pk2x
    @user-or5oz1pk2x 2 месяца назад

    Thanks a lot Bhaiya

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

    what about the time complexity of sorting ? we need to add it right ?

  • @gauravbanerjee2898
    @gauravbanerjee2898 2 месяца назад

    Thanks a lot

  • @manishkaushik6526
    @manishkaushik6526 9 месяцев назад

    but for the first approach it is neccessary to sort ?

  • @hamzarehman7057
    @hamzarehman7057 Год назад +2

    Sir I had a query. Since I'm learning DSA for the first time. Should I solve the easy questions of all topics and then move to their medium and hard questions. or study a topic like easy>medium>hard and then next topic?

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

      Solve easy ones , once you have done around 50-60 easy questions then move to

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

    Don't we need to sort the array in linear search too? It should add an extra nlogn to the time complexity right?

  • @ishaanchandak4774
    @ishaanchandak4774 10 месяцев назад +1

    can we do it using dp i tried it but wasn't getting the correct ans

  • @aaronargottelopez3488
    @aaronargottelopez3488 Месяц назад

    Thanks!

  • @culeforever5408
    @culeforever5408 8 месяцев назад +1

    understood 😇

  • @AK-nj1je
    @AK-nj1je 3 месяца назад

    You're seriously a legend 🔥🔥🔥 you made me consistent to dsa
    Thanks a lot❤
    Those who cannot find this question on leetcode, there's a question as 1552. Magnetic Force Between Two Balls which is as same as this you can do that.

  • @YourCodeVerse
    @YourCodeVerse 6 месяцев назад

    Understood✅🔥🔥

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

    Understood 🎉

  • @rahulbhagat4023
    @rahulbhagat4023 11 месяцев назад

    why is it necessary to fix the first cow at the first position?

  • @Manishgupta200
    @Manishgupta200 11 месяцев назад

    Taking high and low is logical and tricky to solve porblem in much more optimal way

  • @Codro09
    @Codro09 3 месяца назад

    Can you solve this in O(n * log(n)) time complexity?

  • @rishabh1S
    @rishabh1S 10 месяцев назад +1

    Not gonna lie, Binary search made it look so simple.

  • @Chandraprakash-kx4ic
    @Chandraprakash-kx4ic Год назад

    #best #explnation

  • @Nimbus2k_rider
    @Nimbus2k_rider Месяц назад

    u r awesome...

  • @user-is6ky7pp2n
    @user-is6ky7pp2n Месяц назад

    Understood !! 😎😎

  • @arihantjammar8888
    @arihantjammar8888 10 месяцев назад

    UNDERSTOOD

  • @thenriquevicentini
    @thenriquevicentini 2 месяца назад

    Understood!

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

    Understood:)

  • @adgaur090
    @adgaur090 10 месяцев назад

    understood sir

  • @AmanKumar-eu1bi
    @AmanKumar-eu1bi Год назад

    Understood

  • @arjunthakur5827
    @arjunthakur5827 3 месяца назад

    My approach sort the array, create an array arrd with difference between consecutive elemnts of the array, if k==2 asign first and last (max distance) if more in arrd, sort it pop until k, the last k poped gives min distance

  • @GyaneshTiwari-dw4zb
    @GyaneshTiwari-dw4zb Год назад +2

    pls add the link of gfg do not remove from sde sheet
    pls pls

  • @harshitjaiswal9439
    @harshitjaiswal9439 11 месяцев назад

    Understoooooooooooooood!

  • @GauravJain-zo8gt
    @GauravJain-zo8gt 21 день назад

    jai jinendra sir

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

    Sir compang will start coming within a month, please upload all the most imp question whivh uou have still not uploaded, topics/question will u think are more important than others!!

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

    great striver i thought of DP in this question but the constraint are just too high

    • @te083tejaspatil8
      @te083tejaspatil8 8 месяцев назад

      can apply recursion here but we will have to take care of lot of things in that solution

  • @manitoshpaul6170
    @manitoshpaul6170 24 дня назад +1

    Is it only me or any one else have also felt that the binary search medium problems are a bit doable rather than the easy problems... They seem to be hard. However, doesn't this problem seems to be a. 90% similar to minimum days to ship d packages or m bouquet flowers problem.

  • @saaishgulekar4693
    @saaishgulekar4693 Год назад +2

    Can we solve this without altering the data(without sorting)?

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

      No , because binary search only applicable in Sorted array 👍

  • @rajveersingh2056
    @rajveersingh2056 10 месяцев назад +1

    Farthest would be (max - min) / (cows - 1)

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

    Understood sir 😉🤍