Longest Increasing Subsequence NlogN | Leetcode

This video explains finding the longest increasing subsequence with an optimal O(NlogN) technique using binary search algorithm.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through WhatsApp query: +91 8918633037
🟣 𝐂𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐚𝐥𝐥 𝐨𝐮𝐫 𝐂𝐨𝐮𝐫𝐬𝐞𝐬: techdose.co.in/
🔵 LinkedIn: / surya-pratap-kahar
🔴 INSTAGRAM: / techdose_official
🟢 𝐓𝐞𝐜𝐡𝐝𝐨𝐬𝐞-𝟏𝟎𝟎 𝐬𝐡𝐞𝐞𝐭: docs.google.com/spreadsheets/...
---------------------------------------------------------------------------------------------------------------------------------------------------------------
𝐋𝐈𝐒 𝐰𝐢𝐭𝐡 𝐃𝐏: • Longest increasing sub...
𝐂𝐎𝐃𝐄 𝐋𝐈𝐍𝐊: gist.github.com/SuryaPratapK/...

Пікірлер: 3

  • @Divya-qt1cf
    @Divya-qt1cfАй бұрын

    Wow 🎉

  • @pratyushshrivastav8530
    @pratyushshrivastav8530Ай бұрын

    We can find out the length of the LIS but the elements involved in the LIS might not always be true with this solution. for input { 2,4,6,8,1} the LIS will be {2,4,6,8} but the nlogn solution will give us the LIS as {1,4,6,8} which is not correct. The nlogn solution can only be used when we require only the length of the LIS and not the elements involved in it.

  • @techdose4u

    @techdose4u

    Ай бұрын

    Yes correct. Its only for finding length of LIS.