← Questions

Is there an island of exactly size k?

0
MetaCodingLast asked Aug 2026

Given a grid of land and water, answer many queries of the form "is there an island of exactly k cells?". Find the islands once, then answer each query quickly, and discuss what changes if the grid is updated between queries.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding