Making A Large Island at UiPath

Hard56.3% acceptance

This problem has 62.5% frequency at UiPath.

Problem Description

You are given an `n x n` binary matrix `grid`. You are allowed to change **at most one** `0` to be `1`. Return _the size of the largest**island** in_ `grid` _after applying this operation_. An **island** is a 4-directionally connected group of `1`s.

Read full problem and hints

Topics

Also asked at 16 companies


More UiPath Questions

View all UiPath questions