---
title: "Discussion on \"LeetCode 130: Surrounded Regions — Step-by-Step Visual Trace\" | Hashnode"
description: "Discussion on \"LeetCode 130: Surrounded Regions — Step-by-Step Visual Trace\". Given a 2D board containing ''X'' and ''O'', capture all regions of ''O'' that are completely surrounded by ''X'' by flipping them to ''X''. Regions connected to the border cannot be captured."
url: "https://hashnode.com/posts/surrounded-regions-visualization/69d7d29eb3157a36ebc026f2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode 130: Surrounded Regions — Step-by-Step Visual Trace](https://blog.tracelit.dev/surrounded-regions-visualization?utm_source=hashnode&utm_medium=feed)

Given a 2D board containing ''X'' and ''O'', capture all regions of ''O'' that are completely surrounded by ''X'' by flipping them to ''X''. Regions connected to the border cannot be captured.

Apr 9 · 2 min read · blog.tracelit.dev  
Read the article

-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[tracelit](https://hashnode.com/@tracelit)

@tracelit

  
[View profile](https://hashnode.com/@tracelit)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
