Conversation
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.