Skip to content

Conversation

@yanglbme
Copy link
Member

@yanglbme yanglbme commented Dec 8, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 8, 2025 23:05
@idoocs idoocs added md Issues or Pull requests relate to .md files core team Issues or pull requests from core team rs Issues or Pull requests relate to .rs code labels Dec 8, 2025
@yanglbme yanglbme merged commit 7b7af5c into main Dec 8, 2025
14 checks passed
@yanglbme yanglbme deleted the dev branch December 8, 2025 23:06
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 adds a Rust solution for LeetCode problem 3583 (Count Special Triplets). The solution implements an efficient O(n) algorithm using hash tables to count triplets where the middle element is half of the values at the outer positions.

Key changes:

  • Added a Rust implementation using HashMaps to track element frequencies on the left and right sides of each potential middle element
  • The solution correctly handles the modulo arithmetic (10^9 + 7) requirement using i64 to prevent overflow
  • The algorithm matches the approach used in other language implementations (Python, Java, C++, TypeScript, Go)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants