Skip to content

Create: 3286-find-a-safe-walk-through-a-grid.py#5837

Open
rishabh5799kumar wants to merge 1 commit into
neetcode-gh:mainfrom
rishabh5799kumar:rishabh
Open

Create: 3286-find-a-safe-walk-through-a-grid.py#5837
rishabh5799kumar wants to merge 1 commit into
neetcode-gh:mainfrom
rishabh5799kumar:rishabh

Conversation

@rishabh5799kumar
Copy link
Copy Markdown

@rishabh5799kumar rishabh5799kumar commented May 20, 2026

File(s) Modified: python/3286-find-a-safe-walk-through-a-grid.py
Language(s) Used: python
Submission URL: https://leetcode.com/problems/find-a-safe-walk-through-a-grid/submissions/2008231707/

Note

Add BFS solution for LeetCode 3286 'Find a Safe Walk Through a Grid'

Adds 3286-find-a-safe-walk-through-a-grid.py with a Solution.findSafeWalk method that uses BFS to find a path from (0,0) to (m-1,n-1) with strictly positive remaining health. Each cell deducts its value from health, and a visited matrix prunes states where the same cell has been reached with equal or greater remaining health.

Macroscope summarized b755627.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant