---
title: "Discussion on \"LeetCode 286: Walls And Gates — Step-by-Step Visual Trace\" | Hashnode"
description: "Discussion on \"LeetCode 286: Walls And Gates — Step-by-Step Visual Trace\". Fill each empty room with the distance to its nearest gate, where rooms are represented by a 2D grid with gates (0), walls (-1), and empty rooms (INF)."
url: "https://hashnode.com/posts/walls-and-gates-visualization/69d7d2b81cf15606b2600950"
---

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

Discussion

# [LeetCode 286: Walls And Gates — Step-by-Step Visual Trace](https://blog.tracelit.dev/walls-and-gates-visualization?utm_source=hashnode&utm_medium=feed)

Fill each empty room with the distance to its nearest gate, where rooms are represented by a 2D grid with gates (0), walls (-1), and empty rooms (INF).

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.
