arrow_back Back to Challenges

#130 Surrounded Regions

Medium Acceptance 0%
description

Problem Description

Given an `m x n` matrix board containing `'X'` and `'O'`, capture all regions that are 4-directionally surrounded by `'X'`. A region is captured by flipping all `'O's` into `'X's` in that surrounded region.

checklist Constraints

See problem description for detailed constraints.

science Examples

Case #1

In: # See problem description for input format
Out: # Expected output

Mastery Tags

Arrays Graphs Matrix

Hiring Companies

Adobe Microsoft
code

Integrated IDE

code_blocks
Coding
psychology
Aptitude