-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat: add rust solution to lc problem: No.3432 #4878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 a Rust solution for LeetCode problem #3432 "Count Partitions with Even Sum Difference". The problem involves counting the number of valid partition points in an array where the difference between the left and right subarray sums is even.
Key changes:
- Implements a prefix sum approach that iterates through the array once, maintaining left and right sums
- Uses conditional logic to count partitions where
(left_sum - right_sum) % 2 == 0 - Consistent with the algorithm used in other language implementations (Python, Java, C++, Go, TypeScript)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.