Skip to content

feat: add solutions for lc No.3846,3844#5040

Merged
yanglbme merged 1 commit intomainfrom
dev
Feb 21, 2026
Merged

feat: add solutions for lc No.3846,3844#5040
yanglbme merged 1 commit intomainfrom
dev

Conversation

@yanglbme
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 21, 2026 13:47
@idoocs idoocs added core team Issues or pull requests from core team cpp Issues or Pull requests relate to .cpp code go Issues or Pull requests relate to .go code java Issues or Pull requests relate to .java code md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code ts Issues or Pull requests relate to .ts code labels Feb 21, 2026
@yanglbme yanglbme merged commit b440c2f into main Feb 21, 2026
16 checks passed
@yanglbme yanglbme deleted the dev branch February 21, 2026 13:47
Copy link
Copy Markdown

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 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.

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 cpp Issues or Pull requests relate to .cpp code go Issues or Pull requests relate to .go code java Issues or Pull requests relate to .java code md Issues or Pull requests relate to .md files py Issues or Pull requests relate to .py code ts Issues or Pull requests relate to .ts code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants