[LeetCode]Find the Closest Palindrome

题目描述:

LeetCode 564. Find the Closest Palindrome

Given an integer n, find the closest integer (not including itself), which is a palindrome.

The 'closest' is defined as absolute difference minimized between two integers.

Example 1:

Input: "123"
Output: "121"

Note ...

继续阅读

[LeetCode]Longest Line of Consecutive One in Matrix

题目描述:

LeetCode 562. Longest Line of Consecutive One in Matrix

Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal.

Example:

Input:
[[0,1,1,0 ...

继续阅读

LeetCode Weekly Contest 28解题报告

LeetCode Weekly Contest 28是LeetCode举办的第三十三场正式周赛,共4道题目,比赛时长1.5小时。

比赛链接:https://leetcode.com/contest/leetcode-weekly-contest-28/

题解列表:

LeetCode 551. Student Attendance Record I

LeetCode 553. Optimal Division

LeetCode 555. Split Assembled Strings

LeetCode 552. Student Attendance Record II

年度归档