Shortest Bridge
Problem: Shortest Bridge
Given an n x n binary matrix grid:
1represents land;0represents water;- there are exactly two islands in the grid.
An island is a group of 1s connected...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
