Answer Exact Island-Size Existence Queries
Company: Meta
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Onsite
Overview: Preprocess a binary grid so exact island-size queries can be answered in average O(1) time. Traverse each four-connected island once, store its completed size in a set, and keep query work independent of grid dimensions.
Read the full Meta Software Engineer interview experience this question came from