Skip to content

feat: update solutions to lc problems: No.3661,3418#5129

Merged
yanglbme merged 1 commit intomainfrom
dev
Apr 3, 2026
Merged

feat: update solutions to lc problems: No.3661,3418#5129
yanglbme merged 1 commit intomainfrom
dev

Conversation

@yanglbme
Copy link
Copy Markdown
Member

@yanglbme yanglbme commented Apr 3, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 3, 2026 00:04
@idoocs idoocs added core team Issues or pull requests from core team md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code labels Apr 3, 2026
@yanglbme yanglbme merged commit 918ed38 into main Apr 3, 2026
12 checks passed
@yanglbme yanglbme deleted the dev branch April 3, 2026 00:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Python implementations (and their README code snippets) for two LeetCode problems to clear @cache memoization state after computing the final answer, aligning them with the repo’s common Python solution pattern.

Changes:

  • Store the DFS result in ans before returning.
  • Call dfs.cache_clear() to clear memoized state after use.
  • Mirror the same change in both Chinese and English README solution snippets.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
solution/3600-3699/3661.Maximum Walls Destroyed by Robots/Solution.py Clear DFS cache after computing answer to avoid lingering memoized state.
solution/3600-3699/3661.Maximum Walls Destroyed by Robots/README.md Update Python snippet to clear DFS cache after computing answer.
solution/3600-3699/3661.Maximum Walls Destroyed by Robots/README_EN.md Update Python snippet to clear DFS cache after computing answer.
solution/3400-3499/3418.Maximum Amount of Money Robot Can Earn/Solution.py Clear DFS cache after computing answer to avoid lingering memoized state.
solution/3400-3499/3418.Maximum Amount of Money Robot Can Earn/README.md Update Python snippet to clear DFS cache after computing answer.
solution/3400-3499/3418.Maximum Amount of Money Robot Can Earn/README_EN.md Update Python snippet to clear DFS cache after computing answer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

core team Issues or pull requests from core team md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants