Shortest Subarray to be Removed to Make Array Sorted | Leetcode 1574

preview_player
Показать описание
This video explains Shortest Subarray to be Removed to Make Array Sorted using the most optimal greedy two pointer approach.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
---------------------------------------------------------------------------------------------------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

Been waiting for your video to come out :D

tarunkolla
Автор

The first case, where you include only subarray starting from the left and remove every other element on the right, was not included in the code. Is there any reason why? Because according to your approach, we should check for each condition.

It seems to me that the code checked the 2nd and 3rd conditions but not the first.

monsuru__o
Автор

quite a tricky question, but brilliant explanation

utkarshramachandraep
Автор

Sir can you please tell us the secret behind generating large test case yourself🙏

challengemania
Автор

in constraints 10^5 N^2 Algorithm will not works can you explain with some examples for these types of Time Complexity

Make a video if you are free sir

flame