-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat: add rust solution to lc problem: No.3531 #4896
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 implementation for LeetCode problem #3531 "Count Covered Buildings". The solution correctly identifies buildings that have at least one building in all four cardinal directions (left, right, up, down) by using hash maps to group buildings by coordinates and checking coverage conditions.
Key Changes
- Implements a Rust solution using HashMap-based grouping and sorting approach
- Uses O(n log n) time complexity where n is the number of buildings
- Follows the same algorithmic approach as other language implementations (Python, C++, Go, Java, TypeScript)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.