Increasing Triplet Subsequence | Leetcode

Sdílet
Vložit
  • čas přidán 10. 05. 2024
  • This video explains the increasing triplet subsequence problem using multiple easy-to-understand and optimal approaches.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
    🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
    🟣 𝐂𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐚𝐥𝐥 𝐨𝐮𝐫 𝐂𝐨𝐮𝐫𝐬𝐞𝐬: techdose.co.in/
    🔵 LinkedIn: / surya-pratap-kahar
    🔴 INSTAGRAM: / techdose_official
    🟢 𝐓𝐞𝐜𝐡𝐝𝐨𝐬𝐞-𝟏𝟎𝟎 𝐬𝐡𝐞𝐞𝐭: docs.google.com/spreadsheets/...
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------
    𝐋𝐈𝐒 𝐢𝐧 𝐍𝐥𝐨𝐠𝐍: • Longest Increasing Sub...
    𝐋𝐈𝐒 𝐰𝐢𝐭𝐡 𝐃𝐏: • Longest increasing sub...
    𝐂𝐎𝐃𝐄 𝐋𝐈𝐍𝐊: gist.github.com/SuryaPratapK/...

Komentáře • 11

  • @AshiqMohammed
    @AshiqMohammed Před 26 dny +1

    The algorithm is wrong at 13:24 for [5,3,0,3,1,-1,2]. It fails the condition where i < j < k.
    When you update variable named as first in code using if condition with -1(from nums[5] in list which is j) , the variable named second holds value 1 (from nums[4] in list which is i). Therefore fails the condition i

  • @joelsamuel9771
    @joelsamuel9771 Před 7 dny

    love the explanation!

  • @ringringlord
    @ringringlord Před 2 měsíci +2

    dry-run was exemplary. thank you

  • @abhilashpatel6852
    @abhilashpatel6852 Před 2 měsíci

    nice explanation. no others could have explained to me like this. thanks!

  • @monikachauhan5931
    @monikachauhan5931 Před měsícem

    Very good explanation 👏 keep it up

  • @MukulBhave-ig4yx
    @MukulBhave-ig4yx Před 2 měsíci

    your explanations are super cool

  • @prashantbharti8314
    @prashantbharti8314 Před 2 měsíci

    We can just use a stack and maintain increasing sequence in it. You explanation also follows the same logic but is difficult to understand in comparison to stack. Let me know if my proposal is incorrect and miss any test cases

    • @techdose4u
      @techdose4u  Před 2 měsíci

      Yes you can solve using stack too :)