Skip to content

Solved DFS-1#1385

Open
Dheepthi-Reddy wants to merge 1 commit intosuper30admin:masterfrom
Dheepthi-Reddy:master
Open

Solved DFS-1#1385
Dheepthi-Reddy wants to merge 1 commit intosuper30admin:masterfrom
Dheepthi-Reddy:master

Conversation

@Dheepthi-Reddy
Copy link
Copy Markdown

  • Solved Flood Fill
  • Solved 01 Matrix

@super30admin
Copy link
Copy Markdown
Owner

  • FloodFill.py: Your solution is well-implemented and correctly solves the problem. The use of DFS is appropriate here, and your comments are clear and helpful. Good job!
  • LeetCode_01_matrix.py: Your approach to solving this problem is incorrect. DFS is not the right choice for this problem because it does not efficiently compute the nearest 0 for each cell. Consider using BFS instead, starting from all 0s and propagating the distances outward. This approach would be more efficient and correct. Additionally, your comments could be more detailed to explain the logic better.

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.

2 participants