Skip to content

feat: add solutions for lc No.1915#5194

Merged
yanglbme merged 1 commit intomainfrom
dev
May 9, 2026
Merged

feat: add solutions for lc No.1915#5194
yanglbme merged 1 commit intomainfrom
dev

Conversation

@yanglbme
Copy link
Copy Markdown
Member

@yanglbme yanglbme commented May 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 9, 2026 00:22
@idoocs idoocs added core team Issues or pull requests from core team 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 labels May 9, 2026
@yanglbme yanglbme merged commit 6d42378 into main May 9, 2026
13 checks passed
@yanglbme yanglbme deleted the dev branch May 9, 2026 00:22
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

Adds/updates LeetCode 1915 (“Number of Wonderful Substrings”) solutions, including a new Rust implementation, and aligns the Python implementation/snippets with the same prefix-xor counting approach.

Changes:

  • Added a Rust solution using prefix parity bitmask counting.
  • Updated the Python solution (and README snippets) to use defaultdict(int) and a summed lookup across the 10 toggled states.
  • Expanded the English README with a clearer algorithm explanation and added the Rust snippet to both READMEs.

Reviewed changes

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

File Description
solution/1900-1999/1915.Number of Wonderful Substrings/Solution.rs New Rust solution implementing prefix XOR + counting over 10-bit states.
solution/1900-1999/1915.Number of Wonderful Substrings/Solution.py Python solution updated to defaultdict(int) and a compact summed contribution for 1-bit toggles.
solution/1900-1999/1915.Number of Wonderful Substrings/README.md Updates Python snippet accordingly and adds a Rust snippet section.
solution/1900-1999/1915.Number of Wonderful Substrings/README_EN.md Adds detailed explanation title/text, updates Python snippet, and adds Rust snippet section.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants