Find Number of Islands with One Edit Allowed
Given a binary grid of land and water cells, find the number of islands (4-directionally connected components of land cells) after making at most one edit — either flipping a water cell to land or a land cell to water.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early August, 2024
Meta
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.