- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
8. Multi-Source Spanning Forests & Edge Pruning | BFS (Codeforces Police Stations)
Closing out Phase 2 with a masterclass in graph reduction. In this lecture, we tackle Codeforces "Police Stations" and explore how a Multi-Source BFS inherently generates a shortest-path spanning forest.
By seeding the queue with all police stations and expanding outward simultaneously, we naturally claim cities optimally. By tracking which edges are used during this "domain expansion," we isolate the absolute minimum roads required to keep the network connected to the stations. Any edge ignored by the BFS is mathematically redundant and safely deleted. We also break down why the distance constraint $d$ provided in the problem description is actually a clever competitive programming red herring.
🔗 Problem Link: https://codeforces.com/contest/796/problem/D
👋 𝐖𝐞𝐥𝐜𝐨𝐦𝐞 𝐭𝐨 𝐭𝐡𝐞 𝐜𝐡𝐚𝐧𝐧𝐞𝐥!
I create content on Competitive Programming, Data Structures & Algorithms (DSA), and now Software Development with Go.
If you find this video helpful, don’t forget to:
👍 Like the video
💬 Comment your doubts/questions (I reply to everyone!)
🔔 Subscribe and turn on notifications to never miss upcoming tutorials
📌 𝐂𝐨𝐧𝐧𝐞𝐜𝐭 𝐰𝐢𝐭𝐡 𝐦𝐞:
🐦 X: https://x.com/Yash_Poonia_
💼 LinkedIn: https://www.linkedin.com/in/yashpoonia/
💻 GitHub: https://github.com/yash7xm/
🌐 Discord: https://discord.gg/dAp2PbKFpV
#BFS #CompetitiveProgramming #GraphTheory #Codeforces #Algorithms #Cplusplus #SoftwareEngineering
Видео 8. Multi-Source Spanning Forests & Edge Pruning | BFS (Codeforces Police Stations) канала Yash Poonia
By seeding the queue with all police stations and expanding outward simultaneously, we naturally claim cities optimally. By tracking which edges are used during this "domain expansion," we isolate the absolute minimum roads required to keep the network connected to the stations. Any edge ignored by the BFS is mathematically redundant and safely deleted. We also break down why the distance constraint $d$ provided in the problem description is actually a clever competitive programming red herring.
🔗 Problem Link: https://codeforces.com/contest/796/problem/D
👋 𝐖𝐞𝐥𝐜𝐨𝐦𝐞 𝐭𝐨 𝐭𝐡𝐞 𝐜𝐡𝐚𝐧𝐧𝐞𝐥!
I create content on Competitive Programming, Data Structures & Algorithms (DSA), and now Software Development with Go.
If you find this video helpful, don’t forget to:
👍 Like the video
💬 Comment your doubts/questions (I reply to everyone!)
🔔 Subscribe and turn on notifications to never miss upcoming tutorials
📌 𝐂𝐨𝐧𝐧𝐞𝐜𝐭 𝐰𝐢𝐭𝐡 𝐦𝐞:
🐦 X: https://x.com/Yash_Poonia_
💼 LinkedIn: https://www.linkedin.com/in/yashpoonia/
💻 GitHub: https://github.com/yash7xm/
🌐 Discord: https://discord.gg/dAp2PbKFpV
#BFS #CompetitiveProgramming #GraphTheory #Codeforces #Algorithms #Cplusplus #SoftwareEngineering
Видео 8. Multi-Source Spanning Forests & Edge Pruning | BFS (Codeforces Police Stations) канала Yash Poonia
Комментарии отсутствуют
Информация о видео
15 мая 2026 г. 15:23:27
00:14:36
Другие видео канала





















