update: 添加问题“1200.最小绝对差”的代码(并更新其题解)#1349
Merged
LetMeFly666 merged 1 commit intomasterfrom Jan 26, 2026
Merged
Conversation
1200: AC.cpp+py+go(#1348) + word: (en) cpp - AC,78.75%,27.52% py - AC,79.19%,24.53% go - AC,16.13%,61.29% Signed-off-by: LetMeFly666 <Tisfy@qq.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds solution code for LeetCode 1200(最小绝对差), fixes previously incorrect implementations for LeetCode 1984(Python/Go), and does some repo housekeeping.
Changes:
- Added LeetCode 1200 solutions in Python/Go/C++.
- Corrected LeetCode 1984 solutions (Python
max→min, Go implementation cleanup). - Removed redundant 1984 “_AC” files and updated repo notes/commit message.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| todo | Updates scratchpad notes; includes a reference to the 1200 write-up. |
| .commitmsg | Updates commit summary for the day’s additions. |
| Codes/1984-minimum-difference-between-highest-and-lowest-of-k-scores_20260125.py | Fixes incorrect aggregation (max→min) for the sliding window diff. |
| Codes/1984-minimum-difference-between-highest-and-lowest-of-k-scores_20260125.go | Fixes function signature/return, but still uses min without ensuring portability. |
| Codes/1984-minimum-difference-between-highest-and-lowest-of-k-scores_20260125_AC.py | Removed redundant AC-only copy. |
| Codes/1984-minimum-difference-between-highest-and-lowest-of-k-scores_20260125_AC.go | Removed redundant AC-only copy. |
| Codes/1200-minimum-absolute-difference_20260126.py | Adds Python solution for problem 1200. |
| Codes/1200-minimum-absolute-difference_20260126.go | Adds Go solution for problem 1200. |
| Codes/1200-minimum-absolute-difference_20260126.cpp | Adds C++ solution for problem 1200. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import "sort" | ||
|
|
||
| func minimumAbsDifference(arr []int) (ans [][]int) { | ||
| sort.Ints(arr) |
There was a problem hiding this comment.
This file has non-gofmt indentation (e.g., sort.Ints(arr) is space-indented while the rest uses tabs). Running gofmt will keep formatting consistent across Go solutions.
Suggested change
| sort.Ints(arr) | |
| sort.Ints(arr) |
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.
By newSolution.py using GH on Windows | close: #1348