Leetcode Triangle 120 || Code + Explanation + Examples || Dynamic Programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ต.ค. 2024
  • Given a triangle array, return the minimum path sum from top to bottom.
    For each step, you may move to an adjacent number of the row below. More formally, if you are on index i on the current row, you may move to either index i or index i + 1 on the next row.
    Example 1:
    Input: triangle = [[2],[3,4],[6,5,7],[4,1,8,3]]
    Output: 11
    Explanation: The triangle looks like:
    2
    3 4
    6 5 7
    4 1 8 3
    The minimum path sum from top to bottom is 2 + 3 + 5 + 1 = 11 (underlined above).
    Example 2:
    Input: triangle = [[-10]]
    Output: -10
    LInk to challenge: leetcode.com/p...

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

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

    Was trying to do this problem since morning finally got the right approach
    Thanks.

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

    your solutions are pretty maam, no wonder i got them from this channel

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

    Tq ma'am my son continue watching ❤️❤️❤️

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

    Clearly presented. Helped me tremendously. Thanks!

  • @saravanans9355
    @saravanans9355 2 หลายเดือนก่อน +1

    Thanks 🎉🎉

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

    amazing explanation

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

    Ma'am u r in IIT Bombay

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

    thank you for your explanation . I get little idea about dp

  • @Bobby-mf6fw
    @Bobby-mf6fw 2 ปีที่แล้ว +1

    Great work mam 👍

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

    thank you 🙏

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

    it will be dp[j] not dp[i] in last foor loop

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

    Grady approach wont satires all test cases , bettter go with dinamic programming

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

    thanks for the explanation

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

    Thanks ma'am

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

    Linkedin profile ?

  • @062_yatinnagpal2
    @062_yatinnagpal2 2 ปีที่แล้ว

    Nice Explanation❤

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

    nic soln thx

  • @AmitKumar-hr3pc
    @AmitKumar-hr3pc 2 ปีที่แล้ว

    nice explanation.

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

    Wonderful ✨✨

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

    just wow

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

    thankyou mam for detailed explanation!!

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

    today this videoo will have more comments than before , i am seeing 8 comments , 868 views lets see at the end of the day

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

    amazing explanation