Shortest Bridge
Medium
Grid Search (BFS & DFS)
A binary grid contains exactly two islands (groups of 4-connected 1s). Print the minimum number of 0s that must be flipped to connect the two islands.
Constraints
2 <= n <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.