Company question banks are included with the Insider plan.
A rectangular grid uses 1 for land and 0 for water. An island is a connected component of land.
Count islands using four orthogonal neighbors. Then support a flag that additionally permits the...