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 hintsTopics
Also asked at 16 companies
More UiPath Questions
Escape a Large MazeHardSorting Three GroupsMediumAs Far from Land as PossibleMediumNumber of IslandsMediumBoats to Save PeopleMedium
View all UiPath questions