Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 305. Number of Islands II
Given an initially all-water m×n grid, process a sequence of add-land operations and return the number of islands (4-directionally connected land components) after each addition. The problem requires maintaining dynamic connectivity efficiently—typically via Union-Find (disjoint set) with handling for duplicate adds and frequent merges.
Asked at:
Uber
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early August, 2025
Uber
Mid-level
Early July, 2025
Uber
Senior
Early April, 2025
Uber
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.