Skip to content

feat: add Rust solutions for lc No.3010 and No.3013#5006

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

feat: add Rust solutions for lc No.3010 and No.3013#5006
yanglbme merged 1 commit intomainfrom
dev

Conversation

@yanglbme
Copy link
Member

@yanglbme yanglbme commented Feb 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 1, 2026 23:25
@idoocs idoocs added md Issues or Pull requests relate to .md files core team Issues or pull requests from core team rs Issues or Pull requests relate to .rs code labels Feb 1, 2026
@yanglbme yanglbme merged commit 5583c4d into main Feb 1, 2026
14 checks passed
@yanglbme yanglbme deleted the dev branch February 1, 2026 23:25
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 Rust implementations for two LeetCode problems from Biweekly Contest 122: an easy problem (#3010) about finding minimum cost when dividing an array into 3 subarrays, and a hard problem (#3013) about dividing an array into k subarrays with a distance constraint. Both solutions use ordered data structures to efficiently solve their respective problems.

Changes:

  • Added Rust solution for problem 3010 using a greedy approach to find the two smallest elements
  • Added Rust solution for problem 3013 using a sliding window with two BTreeMaps to maintain ordered elements

Reviewed changes

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

File Description
Solution.rs (3010) Implements greedy algorithm to find first element plus two smallest from remaining array
Solution.rs (3013) Implements sliding window with dual BTreeMap approach for maintaining k smallest elements in a constrained range

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants