Skip to content

feat: add solutions for lc No.3120,3121#5191

Merged
yanglbme merged 1 commit into
mainfrom
dev
May 8, 2026
Merged

feat: add solutions for lc No.3120,3121#5191
yanglbme merged 1 commit into
mainfrom
dev

Conversation

@yanglbme
Copy link
Copy Markdown
Member

@yanglbme yanglbme commented May 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 8, 2026 00:35
@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 rs Issues or Pull requests relate to .rs code ts Issues or Pull requests relate to .ts code labels May 8, 2026
@yanglbme yanglbme merged commit 7833ad6 into main May 8, 2026
16 checks passed
@yanglbme yanglbme deleted the dev branch May 8, 2026 00:36
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 the existing multi-language solution for LC 3121 by simplifying the per-letter validation logic, and adds Rust implementations (plus documentation snippets) for LC 3120 and LC 3121 within the repository’s solutions collection.

Changes:

  • Simplified the “special character” check for LC 3121 across C++/Go/Java/TypeScript (removing redundant first[...] > 0 presence checks).
  • Added Rust solutions for LC 3120 and LC 3121.
  • Updated both Chinese and English READMEs to include the Rust implementations and keep code snippets in sync with the solution files.

Reviewed changes

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

Show a summary per file
File Description
solution/3100-3199/3121.Count the Number of Special Characters II/Solution.ts Refactors per-letter check for readability by introducing a/b and removing redundant presence test.
solution/3100-3199/3121.Count the Number of Special Characters II/Solution.rs Adds Rust implementation for LC 3121.
solution/3100-3199/3121.Count the Number of Special Characters II/Solution.java Refactors per-letter check with a/b and removes redundant presence test.
solution/3100-3199/3121.Count the Number of Special Characters II/Solution.go Simplifies condition by removing redundant first[...] > 0 check.
solution/3100-3199/3121.Count the Number of Special Characters II/Solution.cpp Simplifies condition by removing redundant first[...] truthiness check.
solution/3100-3199/3121.Count the Number of Special Characters II/README.md Syncs snippet changes and adds Rust section.
solution/3100-3199/3121.Count the Number of Special Characters II/README_EN.md Syncs snippet changes and adds Rust section.
solution/3100-3199/3120.Count the Number of Special Characters I/Solution.rs Adds Rust implementation for LC 3120.
solution/3100-3199/3120.Count the Number of Special Characters I/README.md Adds Rust snippet for LC 3120.
solution/3100-3199/3120.Count the Number of Special Characters I/README_EN.md Adds Rust snippet for LC 3120.

💡 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 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