Longest Increasing Subsequence NlogN | Leetcode #300 | LIS

preview_player
Показать описание
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
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

dmn, after your explanation it was so easy to understand, thanks a lot!!! :)

heybeachMIN
Автор

The best explanation I have ever seen! Thank you!

kowboyorchikk
Автор

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.

pratyushshrivastav