Skip to content

refactor(lcof): simplify string joining in problem 45 Java solution#5084

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

refactor(lcof): simplify string joining in problem 45 Java solution#5084
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 23:38
@idoocs idoocs added core team Issues or pull requests from core team java Issues or Pull requests relate to .java code md Issues or Pull requests relate to .md files labels Mar 12, 2026
@yanglbme yanglbme merged commit 37e5ed9 into main Mar 12, 2026
12 checks passed
@yanglbme yanglbme deleted the dev branch March 12, 2026 23:39
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 refactors the 剑指 Offer (lcof) Problem 45 Java solution to simplify building the final result string by using stream-based joining.

Changes:

  • Convert the int[] to a Stream<String> and sort using the existing concatenation comparator.
  • Replace manual string concatenation/building with Collectors.joining() to produce the final answer.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants