L4. Jump Game - I | Greedy Algorithm Playlist

Поделиться
HTML-код
  • Опубликовано: 5 окт 2024
  • Find problem link, notes in step 12: takeuforward.o...
    Follow me on socials: linktr.ee/take...

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

  • @Professor-du2pf
    @Professor-du2pf 4 месяца назад +29

    After watching the DP Approach this greedy code is far very easy .

  • @ritikkumarsingh5902
    @ritikkumarsingh5902 4 месяца назад +10

    Striver, your DSA Sheet is absolutely phenomenal! It's been an invaluable resource for mastering data structures and algorithms. Looking forward to the remaining topics, especially the much-anticipated sections on strings and heaps. Thanks for all your hard work!

  • @LokeshSharmaCP
    @LokeshSharmaCP 4 месяца назад +10

    i thought about recursion approach but this is really easy and optimal

  • @Paradox_1
    @Paradox_1 4 месяца назад +9

    Radhe Radhe bhaiya 💖

  • @Josuke217
    @Josuke217 4 месяца назад +36

    Waiting for strings ...

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

      do you come to menace and monk streams

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

      @@KartikeyTT no

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

      @@Josuke217 okay

  • @GungunSaluja-sy6br
    @GungunSaluja-sy6br 3 месяца назад +2

    waiting for String playlist ❤ and till now all the videos of greedy are osm

  • @mohit7717
    @mohit7717 10 часов назад

    Before watching Greedy Algorithm, I thought it was too tough. but after watching ohh it's the easiest one.

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

    "UNDERSTOOD BHAIYA!!"

  • @UECAshutoshKumar
    @UECAshutoshKumar 18 дней назад +1

    Thank you

  • @top_10_2.O
    @top_10_2.O 2 месяца назад +2

    We can go from last index to 1st
    If we can't go then false else true

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

    Thank you very much

  • @KKKK-pl8yf
    @KKKK-pl8yf 4 месяца назад

    Good morning striver !

  • @KKKK-pl8yf
    @KKKK-pl8yf 4 месяца назад +1

    Stack and Queue ki playlist daaldo bro please, eagerly waiting. Mail bhi kia thha poochhne ke lie but you did not reply

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

    awesome

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

    bool canJump(vector& nums) {
    int current=0;
    int available=0;
    for(int i=0;iavailable){
    available=current;
    }
    else if(available==0){
    return false;
    }

    available--;

    }
    return true;
    }

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

    thanks for the solution

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

    Hey striver,in DSA a to z course there is no video on Java collections

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

    please,anyone can explain intution behind it, why he is not using dp here

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

      This is similar to Buy and sell stock 1 here basically we need to figure out whether we can able to jump to last index or not so let's say as he mention from particular index I he can jump to at max 6 and try to traversing the array by calculating from that index what is the jump possobile at any moment lets at index I he can go to max of x but to reach till I the max possible jump we can take is y if y

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

    Thankyou so much Striver for all you efforts throughout in delivering us so much valuable content. Any student / working professional can now be able to transition their career without paying money for courses.
    Would also like your insights on the point :
    While preparing for interviews most of the aspirants are going through the videos solely and solving the question after completely watching the video. And also are feeling lazy trying to solve the question on our own. What is the best way to complete any topic without being lazy and how should an aspirant approach any topic/playlist?

    • @abhavgoel9390
      @abhavgoel9390 2 месяца назад +1

      by not watching the video first and try to solve the question beforehand. And you talk about laziness to solve a question that help you land a job bro, you shouldn't be even asking this question if you were motivated enough

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

    "Someone did touch you" sounds so wrong haha

  • @rudrakshamishra2668
    @rudrakshamishra2668 25 дней назад

    please make a solution on the right answer

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

    Please add the links of these new videos to the A2Z Dsa sheet

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

    Best solution

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

    Hello guys !!! please pay attention iterate the i or n upto size not size -1 else it will not pass the few test cases :)

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

    please add link to this video in your a2z sheet

  • @Professor-du2pf
    @Professor-du2pf 4 месяца назад

    Mind Benging brooo

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

    waiting for Strings playlist

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

    Understood

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

    This above explained solution is not working for [3,2,1,0,4] if we are starting from starting index

    • @harshitsinghbaghel1789
      @harshitsinghbaghel1789 10 дней назад +1

      what's wrong in this it will be false in answer will not be able to reach till the last

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

    please bring the string video first .A humble request from us

  • @rudrakshamishra2668
    @rudrakshamishra2668 25 дней назад +2

    yes this solution is not passed on the[3,2,1,0,4] this case on leet code only 146 / 172 testcases passed

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

      it does, but try for loop until last element
      for(int i=0; i maxIndex)
      return false;
      maxIndex = max(maxIndex, i+nums[i]);
      }

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

    ty sir

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

    understood

  • @SiddharthSingh-un8ue
    @SiddharthSingh-un8ue 4 месяца назад

    what if there are multiple zeroes in the array; than the method doesn't seem to work?

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

    prefix coding pattern

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

    can anyone explain me how is this greedy

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

      yes, for every step the mindset to jump maximum so its greedy method

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

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

    paaji tussi great ho taufa
    kabul karo

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

      😂😂

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

    waste 3500 on pw java course which is not 1% of your free resource

  • @SibiRanganathL
    @SibiRanganathL 25 дней назад

    bruh

  • @great.Indian.culture
    @great.Indian.culture Месяц назад

    Bhai kya padhate ho ap never understood anything in my life what u taught

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

    Understood

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

    please bring the string video first .A humble request from us

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

    Understood