Leetcode | Weekly Contest 402 | B | C | D | 3185 | 3186 | 3187 | Editorial | Peaks in array Solution

Поділитися
Вставка
  • Опубліковано 26 сер 2024

КОМЕНТАРІ • 26

  • @gyanikumari4973
    @gyanikumari4973 2 місяці тому +1

    Nice explanation 🔥🔥 thanks for sharing

  • @reactcode9148
    @reactcode9148 2 місяці тому +1

    Thanks for Sharing

  • @ouvik9509
    @ouvik9509 2 місяці тому +3

    nice explanation ❤ keep doing ,helpful.
    also upload codeforces contest qs.

  • @amanshaw5846
    @amanshaw5846 2 місяці тому +1

    Acha explain kiye... thanks

  • @techyguy7776
    @techyguy7776 2 місяці тому +1

    Great Explanation!

  • @insidious_681
    @insidious_681 2 місяці тому +2

    thank u bhaiya
    dp nhi pehchanne ko ata ki ye q dp ka h

    • @pretestpassed157
      @pretestpassed157  2 місяці тому +2

      Koi na practice karo dhere dhere aane lagega

  • @its385
    @its385 2 місяці тому +1

    bhai dp ke problem solving ke resources suggest krdo, identify toh ho jaati hai, dp ki problem hai par state aur transition sochne waqt bilkul blank ho jaata hu

    • @pretestpassed157
      @pretestpassed157  2 місяці тому +1

      Ye sabhi k sath hota h start me. I would suggest Just start practicing, easy level questions of dp from leetcode if you get confident from easy one switch to medium level and then hard. And also try to remember it's pattern so that if next time you tackle the same kind of problem then you can apply its logic to that problem. And in the initial phase try to write recursive dp solution rather than iterative.
      Also just try to spend some time on the problem and if still you didn't get any logic then just see its minor hint rather than seeing the solution directly and then try to solve, if u are able to solve then it's ok otherwise you can see the solution after spending some time.
      Just follow it for a few weeks, it will improve your dp.
      But try to practice as much different dp problems as you can.

    • @its385
      @its385 2 місяці тому +1

      @@pretestpassed157 ok bro, mera emphasize bhi problem ka main idea as a hint lene ka hota hai, rest implementation part mein mera koshish rehta hai ke mai hu code likhu aapne idea ka, thanks for being actively replying :)

  • @bhaktisharma9681
    @bhaktisharma9681 2 місяці тому +1

    Bhaiya, hum value-1 aur value-2 ka case handle kyun nahi kar rahe hain yahan? Sirf aage he kyun check kar rahe hain?

    • @pretestpassed157
      @pretestpassed157  2 місяці тому

      Koon sa problem B ?

    • @bhaktisharma9681
      @bhaktisharma9681 2 місяці тому +2

      @@pretestpassed157 Max total damage waala, usme keh rahe hain ki value -1 , val -2, val +1 and val + 2 nahi le sakte hain, lekin code main hum sirf aage ki values he check kyun kar rahe hain?

    • @pretestpassed157
      @pretestpassed157  2 місяці тому +1

      Islea q ki hm phle se hi wo vector pair ko sort kar dea h, fir hm 0th index se uss vector pair ko traverse kar rhe to 0th index k baad to 1 index hi aayega fir 2 , 3 , and so on.
      To hm just next index jo ki 1 h uss se sath me puch v rhe ki tmko le ya naa le to isse tmhara sara case cover ho jayega islea hmme piche Jane ka jarurat hi ni padega.

    • @bhaktisharma9681
      @bhaktisharma9681 2 місяці тому +1

      @@pretestpassed157 Ohh okay bhaiya, thank you so much.. aap bahut acha padate ho bhaiya!!

    • @pretestpassed157
      @pretestpassed157  2 місяці тому

      Thankyou

  • @ronakkriplani1838
    @ronakkriplani1838 2 місяці тому +1

    codeforces ka

    • @pretestpassed157
      @pretestpassed157  2 місяці тому +2

      I didn't participate in the Codeforces contest yesterday. Because of some personal work and it's unusual timing. If I will get some time, will try to make it's editorial too.

  • @ronakkriplani1838
    @ronakkriplani1838 2 місяці тому +1

    apne konsa extension lagaya h lc mai jisse company tag show hote h??