Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

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

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Surrounded Regions | Leetcode

Автор: Techdose

Загружено: 2020-06-17

Просмотров: 30601

Описание:

This video explains a very important programming interview problem which is to mark all surrounded regions of zeroes with all X.A group of zero is called a region when the group doesn't have any boundary zero.If a group of zeroes have one or more boundary zero then they will not form a valid region and hence remain unchanged in the result.I have shown 2 approaches for this problem.The first approach is by using 2 DFS calls.Call once to verify if the region is valid and if it is valid then call the second DFS call to convert all 0s to X.The second method is an efficient approach which makes use of DFS to mark all non-region zeroes to 1s and then iterate over the entire matrix to convert all remaining 0s to X and all 1s to 0s again and skip all X.At the end of the video, i have explained the code-walk through for both the depth first search traversal methods.CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)

=================================================================
INSTAGRAM:   / surya.pratap.k  
LinkedIn:   / surya-pratap-kahar-47bb01168  
=================================================================

CODE LINK: https://gist.github.com/SuryaPratapK/...


DFS:    • Depth first search | DFS | Depth first tra...  

BFS:    • Breadth first search | BFS | Breadth first...  
Number of islands:    • Number of islands | Leetcode #200  

Surrounded Regions | Leetcode

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

G-14. Surrounded Regions | Replace O's with X's | C++ | Java

G-14. Surrounded Regions | Replace O's with X's | C++ | Java

Surrounded Regions - Graph - Leetcode 130 - Python

Surrounded Regions - Graph - Leetcode 130 - Python

H Index II | Binary search | Leetcode #275

H Index II | Binary search | Leetcode #275

Perfect squares | Dynamic programming | Legendre's  theorem | Leetcode #279

Perfect squares | Dynamic programming | Legendre's theorem | Leetcode #279

Cheapest Flights Within K Stops | DFS + Pruning | Leetcode #787

Cheapest Flights Within K Stops | DFS + Pruning | Leetcode #787

Single Number II | 4 Methods | Leetcode #137

Single Number II | 4 Methods | Leetcode #137

Surrounded Regions | BFS & DFS | LeetCode

Surrounded Regions | BFS & DFS | LeetCode

Долбануть по Ирану, отжать Гренландию | Обычный вторник Трампа? (English subtitles)

Долбануть по Ирану, отжать Гренландию | Обычный вторник Трампа? (English subtitles)

15. Surrounded Regions | LeetCode Question 130 | Intuition with Easy C++, JAVA Code | MUST DO Algos!

15. Surrounded Regions | LeetCode Question 130 | Intuition with Easy C++, JAVA Code | MUST DO Algos!

Reconstruct Itinerary | Leetcode #332

Reconstruct Itinerary | Leetcode #332

Мой мозг после 569 проблем с Leetcode

Мой мозг после 569 проблем с Leetcode

Kahn's algorithm | Topological sort | Course schedule 2 | Leetcode #210

Kahn's algorithm | Topological sort | Course schedule 2 | Leetcode #210

Как решить ЛЮБУЮ проблему LeetCode (шаг за шагом)

Как решить ЛЮБУЮ проблему LeetCode (шаг за шагом)

Word Search II | DFS + Map | DFS + TRIE | Leetcode #212

Word Search II | DFS + Map | DFS + TRIE | Leetcode #212

Какая нейросеть лучшая в вайб-кодинге в 2026? GPT vs Claude vs Gemini (vs все остальное)

Какая нейросеть лучшая в вайб-кодинге в 2026? GPT vs Claude vs Gemini (vs все остальное)

Surrounded Regions | Boundary DFS ✅ Graph Explained Hindi Leetcode | Complete Graph Videos

Surrounded Regions | Boundary DFS ✅ Graph Explained Hindi Leetcode | Complete Graph Videos

Jump game | Leetcode #55 | Valley peak approach

Jump game | Leetcode #55 | Valley peak approach

Максимальная площадь острова | LeetCode 695 | C++, Python

Максимальная площадь острова | LeetCode 695 | C++, Python

LeetCode 130. Surrounded Regions (Algorithm Explained)

LeetCode 130. Surrounded Regions (Algorithm Explained)

Змеи и лестницы — Leetcode 909 — Python

Змеи и лестницы — Leetcode 909 — Python

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com