Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds solutions for two LeetCode problems (3844 and 3846) in multiple programming languages. The solutions implement efficient algorithms for calculating keyboard typing distance and finding almost-palindromic substrings.
Changes:
- Added solution for problem 3846 "Total Distance to Type a String Using One Finger" using Manhattan distance simulation
- Added solution for problem 3844 "Longest Almost-Palindromic Substring" using center expansion with character skipping
- Implemented solutions in Python, Java, C++, Go, and TypeScript for both problems
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| solution/3800-3899/3846.Total Distance to Type a String Using One Finger/Solution.py | Python implementation using precomputed keyboard positions with Manhattan distance |
| solution/3800-3899/3846.Total Distance to Type a String Using One Finger/Solution.java | Java implementation with static initialization of keyboard positions |
| solution/3800-3899/3846.Total Distance to Type a String Using One Finger/Solution.cpp | C++ implementation using lambda for static position map initialization |
| solution/3800-3899/3846.Total Distance to Type a String Using One Finger/Solution.go | Go implementation with init function for position map setup |
| solution/3800-3899/3846.Total Distance to Type a String Using One Finger/Solution.ts | TypeScript implementation with module-level position computation |
| solution/3800-3899/3846.Total Distance to Type a String Using One Finger/README.md | Chinese problem description and solution explanation |
| solution/3800-3899/3846.Total Distance to Type a String Using One Finger/README_EN.md | English problem description and solution explanation |
| solution/3800-3899/3844.Longest Almost-Palindromic Substring/Solution.py | Python implementation using center expansion with one-character skip |
| solution/3800-3899/3844.Longest Almost-Palindromic Substring/Solution.java | Java implementation with helper method for palindrome expansion |
| solution/3800-3899/3844.Longest Almost-Palindromic Substring/Solution.cpp | C++ implementation using lambda for palindrome expansion logic |
| solution/3800-3899/3844.Longest Almost-Palindromic Substring/Solution.go | Go implementation with closure for expansion function |
| solution/3800-3899/3844.Longest Almost-Palindromic Substring/Solution.ts | TypeScript implementation with arrow function for expansion |
| solution/3800-3899/3844.Longest Almost-Palindromic Substring/README.md | Chinese problem description and solution explanation |
| solution/3800-3899/3844.Longest Almost-Palindromic Substring/README_EN.md | English problem description and solution explanation |
💡 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.