Leetcode 664. Strange Printer II Matrix Chain Multiplication II DP || Complete Intuition

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

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

  • @vijaykumar-x2y2t
    @vijaykumar-x2y2t ปีที่แล้ว +39

    Throw the printer out .
    Problem solved

  • @ravipatel-xu5qi
    @ravipatel-xu5qi ปีที่แล้ว +8

    Hi Arayn , first of all thank you so much for putting so much efforts and create videos. I know it is not very easy to record video and explain the solution of daily leetcode problem solution on every day.
    Your way of explaining the solution is really good. I would like to request you to explain in each video that why you are not picking other Data structure and how you are coming to this solution. Basically it would be good if you would explain on why other solutions won't work and where they will be messed up and why this solution works.
    Sometimes your videos becomes only the explanation which is given in leetcode editorial tab. Your code looks same what is there. I would love to see some other way of writing the code or conditions which can help to understand more.
    Please don't treat this as criticism. Keep growing and keep making more good videos.
    I always refer your videos when I don't understand problem or don't understand leetcode editorial solution.

  • @Heatburst0
    @Heatburst0 ปีที่แล้ว +10

    Hey man, your way of explaining problems and approach are pretty good but I think you explain things pretty fast and if you slow it down a little bit then everyone will be able to grasp your explaination :)

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

    Apprication...!! finally found a perfect solution with proper explaination...

  • @Lucifer-spam
    @Lucifer-spam ปีที่แล้ว +3

    Best solution ever for this question 🔥🔥

  • @kevinujunior
    @kevinujunior ปีที่แล้ว

    It's amazing how you make the problem look much easier.

  • @MP-ny3ep
    @MP-ny3ep 4 หลายเดือนก่อน +1

    Great explanation as always. Thank you

  • @andrewchang7986
    @andrewchang7986 ปีที่แล้ว

    Clear explanation. Thanks a lot.

  • @GateDA-omkarpunjaji
    @GateDA-omkarpunjaji 4 หลายเดือนก่อน

    Great explanation❤❤

  • @leepakshiyadav1643
    @leepakshiyadav1643 ปีที่แล้ว

    brilliant explanation, thanks :)

  • @mrityunjoybarman9098
    @mrityunjoybarman9098 ปีที่แล้ว

    Immediately solved the problem after your hint.

  • @aman1396
    @aman1396 ปีที่แล้ว

    amazing content keep moving ahead

  • @076_siddharthrathor4
    @076_siddharthrathor4 ปีที่แล้ว

    Great explanation bro ❤

  • @sandeeppandit6695
    @sandeeppandit6695 ปีที่แล้ว

    Very well explained😇

  • @thisIsCodeSquare
    @thisIsCodeSquare ปีที่แล้ว

    Hello Aryan Bhaiya... I love your videos and your way of explaining solutions is just awesome. It makes is so easy to see the approach once you explain it thank you so much for such great videos and i request you to please keep making them..
    Your energy and your vibes makes these videos 10x better...🤩

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

    Hey after your explanation it makes sense but you didn't explain what are all the factors leads to MCM

  • @chandrachurmukherjeejucse5816
    @chandrachurmukherjeejucse5816 ปีที่แล้ว

    Hey Aryan your explanations are really great. 🔥

  • @sundaran9625
    @sundaran9625 ปีที่แล้ว

    bro how did u got to this recursive code,..

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

    wow thank you so much

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

    excellent approach and intution building .

  • @Alim-290
    @Alim-290 ปีที่แล้ว +2

    now your video time is good brother. keep your video duration in this range 15min- 20min only

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

    💯

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

    Bro where have you disappeared?

  • @toxic_roy
    @toxic_roy ปีที่แล้ว

    koi iss method ka tabulation batado plz, global variable ke bina tle de rha hai

  • @abhishekjhanji3014
    @abhishekjhanji3014 ปีที่แล้ว

    can you explain why u check s[i]==s[j] ?? It should be s[i]==s[k+1] ?? Please explain its confusing

  • @atishaykumar6006
    @atishaykumar6006 ปีที่แล้ว

    Please let me know, why we use this " const string& s " in solve function, i use simple "const string s" this solution give TLE.

    • @ADITYA-fk1zy
      @ADITYA-fk1zy ปีที่แล้ว +1

      const string s - this when passed into other recursive calls creates copy of the original string each time we call it. this is called pass by value.
      const string &s - with this syntax we are passing the reference of the original string, avoiding creation of copies of the original. this is called pass by reference (meaning the address of the original string) .

    • @tsukuruuu
      @tsukuruuu ปีที่แล้ว

      passing as "string &s" or "&dp" means we are passing it as reference so our function doesn't need to make a copy of the string everytime it gets called(it directly works on the original string). so it sometimes significantly reduces the unnecessary memory requirements. check out pass by reference articles. might help.

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

    you should improve your communication skill , don't try to be oversmart, be calm while teaching.❤

    • @lavanya_m01
      @lavanya_m01 4 หลายเดือนก่อน +3

      Bro He is SMART as he makes a hard sum understandable in under 15 minutes. Be grateful for what u get for free.

    • @kotto4416
      @kotto4416 4 หลายเดือนก่อน +1

      I love his expressions and for me this is the reason why i did subsribe to this channel , the way of speaking makes it more interesting and easier to understand if u can followup imo

  • @Somesh-i2x
    @Somesh-i2x 4 หลายเดือนก่อน +1

    Speak properly instead of jumping 🤣

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

    gr8!!!

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

    Kaha gayab ho sirrrrr 🙏

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

    you will break your back 😂

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

    The key part in the solution is if s[i] == s[j], we need to subtract 1. Your explanation to why we need to subtract 1 is not sufficient. You are explaning as if you have mugged up the solution.

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

      Same thought. After finding another video I think the intuition here is that if both ends are equal then we can just print all the way to the end thus saving us one printing action. This is also because the partition is actually the act of printing the char on i, from i to k. Then we cut the problem into two parts.

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

    y r u in so hurry brother aaram se koi jaldi nhi h ...

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

    bro what did you say at the start ie from 0:00 to 0:05 🤣🤣

  • @AdityaMishra-ji8nm
    @AdityaMishra-ji8nm 5 หลายเดือนก่อน +3

    urgently request youtube to remove such worst video at earliest possible

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

    This is not mcm this is type of front partition

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

    Bhaiya Gutka thook ke video start kia kro

  • @JIGARSINGTHAKOR-yy6qp
    @JIGARSINGTHAKOR-yy6qp 4 หลายเดือนก่อน

    Laut aao ab