Skip to content

feat: add solutions for lc No.3634#5013

Merged
yanglbme merged 1 commit intomainfrom
dev
Feb 4, 2026
Merged

feat: add solutions for lc No.3634#5013
yanglbme merged 1 commit intomainfrom
dev

Conversation

@yanglbme
Copy link
Copy Markdown
Member

@yanglbme yanglbme commented Feb 4, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 4, 2026 23:51
@idoocs idoocs added 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 rs Issues or Pull requests relate to .rs code ts Issues or Pull requests relate to .ts code labels Feb 4, 2026
@yanglbme yanglbme merged commit f29a530 into main Feb 4, 2026
21 of 22 checks passed
@yanglbme yanglbme deleted the dev branch February 4, 2026 23:51
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 adds complete solutions for LeetCode problem 3634 "Minimum Removals to Balance Array" (使数组平衡的最少移除数目), a medium-difficulty problem from Biweekly Contest 162 Q2.

Changes:

  • Added two solution approaches: sorting with binary search (Solution 1) and sorting with two pointers (Solution 2)
  • Implemented solutions in Python, Java, C++, Go, and TypeScript
  • Provided bilingual documentation (Chinese and English) with problem description, examples, constraints, and solution explanations

Reviewed changes

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

Show a summary per file
File Description
Solution.py Binary search approach to find maximum valid subarray length
Solution.java Binary search implementation with overflow protection
Solution.cpp C++ implementation using ranges and upper_bound
Solution.go Go implementation with int64 conversions for overflow safety
Solution.ts TypeScript implementation using lodash sortedIndexBy
Solution2.py Two-pointer sliding window approach
Solution2.java Java two-pointer with explicit long cast
Solution2.cpp C++ two-pointer with long long cast
Solution2.go Go two-pointer implementation
Solution2.ts TypeScript two-pointer approach
README.md Chinese documentation with problem and solution details
README_EN.md English documentation with problem and solution details

💡 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 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 rs Issues or Pull requests relate to .rs 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