У нас вы можете посмотреть бесплатно Monotonic Stack Explained или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Making coding videos to improve. Subscribe for more! Email: kacycodes@gmail.com Time Complexity is O(n) for finding all previous/next greater elements because each element in the array is only pushed to the stack 1 time, and each element is only popped at most once. Timestamps 0:00 What is a monotonic stack? 0:21 monotonically increasing stack - example 1:37 monotonically decreasing stack - example 2:16 find previous greater and next greater elements - example 5:58 Code - find previous greater and next greater elements 8:27 Code - find next greater elements using Array.fill() and popping 10:59 Code - find next greater elements using array.length 12:10 Code - find previous greater and next greater elements in one loop 15:44 Outro