Surrounded Regions Using a Custom Union-Find

Task

The phonetic question number in the post corresponds to LeetCode 130, Surrounded Regions. The interview required completing a union-find skeleton and then solving this problem with that implem...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: