Complete Solutions to Every Problem From This Competitive Programming Problem Set: https://cses.fi/problemset/
Curated by: Alpha-Code (18 videos)
This is part 5 of me doing problems from the CSES problem set dealing with graphs. Here we tackle some of the heavier graph machinery: functional graph queries combining cycle decomposition with binary lifting, Minimum Spanning Tree via Kruskal's with Union-Find, augmenting Union-Find to track component counts and sizes, and strong connectivity via dual BFS on a graph and its reverse. Problem Set: https://cses.fi/problemset/ 0:00 Intro 0:16 Planets Queries II (cycle decomposition + binary lifting + topological depths) 45:50 Planet Cycles (reusing cycle decomposition for cycle length queries) 48:22 Road Reparation (MST via Kruskal's with Union-Find) 57:07 Road Construction (Union-Find with component count + max component size) 1:02:44 Flight Routes Check (strong connectivity via forward + reverse BFS) 1:11:09 Wrap-up 🚀 Book a Mock Interview with me: https://calendly.com/anatoliy-sokolov 💬 Join the Discord Community: https://discord.gg/ufpdqkSupH #softwareengineering #codinginterview #leetcode #faang