Skip to content

feat: add solutions for lc No.3600#5078

Merged
yanglbme merged 1 commit intomainfrom
dev
Mar 12, 2026
Merged

feat: add solutions for lc No.3600#5078
yanglbme merged 1 commit intomainfrom
dev

Conversation

@yanglbme
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 12, 2026 00:05
@idoocs idoocs added cpp Issues or Pull requests relate to .cpp code core team Issues or pull requests from core team go Issues or Pull requests relate to .go code java Issues or Pull requests relate to .java code md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code ts Issues or Pull requests relate to .ts code labels Mar 12, 2026
@yanglbme yanglbme merged commit 7bf3545 into main Mar 12, 2026
16 checks passed
@yanglbme yanglbme deleted the dev branch March 12, 2026 00:05
Copy link

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 adds solutions for LeetCode problem 3600 "Maximize Spanning Tree Stability with Upgrades" (Hard, Weekly Contest 456 Q4) in five languages. The solution uses binary search on the answer combined with Union-Find to verify feasibility of a given stability threshold.

Changes:

  • Added solutions in Python, Java, C++, Go, and TypeScript using a binary search + Union-Find approach
  • Added bilingual README files (English and Chinese) with problem description, examples, constraints, and solution explanation

Reviewed changes

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

Show a summary per file
File Description
Solution.py Python solution using UnionFind class with binary search on stability
Solution.java Java solution with same algorithm, using instance fields for state
Solution.cpp C++ solution using unite method naming to avoid keyword conflict
Solution.go Go solution using package-level globals for check helper access
Solution.ts TypeScript solution using module-level variables for check helper
README.md Chinese problem description and solution explanation
README_EN.md English problem description and solution explanation

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

You can also share your feedback on Copilot code review. Take the survey.

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 cpp Issues or Pull requests relate to .cpp code go Issues or Pull requests relate to .go code java Issues or Pull requests relate to .java code md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code ts Issues or Pull requests relate to .ts code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants