Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Sliding Window Algorithm - Longest Substring Without Repeating Characters (LeetCode) в хорошем качестве

Sliding Window Algorithm - Longest Substring Without Repeating Characters (LeetCode) 4 года назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Sliding Window Algorithm - Longest Substring Without Repeating Characters (LeetCode)

Check out my interview prep platform for learning the patterns! 📢 Interview Prep Platform: https://algoswithmichael.com 🎧 Join the community Discord:   / discord   💰 Support me on Patreon:   / michaelmuinos   🔗Follow me on LinkedIn:   / michael-muinos   📂Follow me on Github: https://github.com/MichaelMuinos Here is a step by step explanation of the algorithm problem "Longest Substring Without Repeating Characters" on the LeetCode platform. This problem is asked at many tech companies including Google, Facebook, Amazon, Uber, Adobe, and many more. In this tutorial video, I go over the sliding window technique. A sliding window algorithm will form a window, or section, around parts of the data. Incrementally, this window will move over the data and perform some sort of computation. To solve it, we must initialize an i and j pointer mapping to our 0 index in our string. We also must initialize a set data structure to keep track of characters we have seen in our window and a max variable. We move the i pointer forward adding each character to our set. If the character is already in our set, we start moving our j pointer forward and removing at each step. After removals, we will compute the length of our window which is i - j + 1 and assign that value to our max variable. The time and space complexity of our sliding window solution is O(N) where N is the number of characters we have in our input string. ⭐️ Timestamps ⭐️ 00:00 - Introduction 00:25 - Problem Overview 00:54 - Brute Force Approach 01:30 - Sliding Window Overview 02:02 - Full Example Walk-through 06:39 - Code Walk-through 09:21 - Time and Space Complexity ---------------------------------------------------- Better Days by Lakey Inspired   / lakeyinspired      / @lakeyinspired  

Comments