Skip to content

Commit 25224e5

Browse files
committed
add 2628 2630
1 parent d20cbb1 commit 25224e5

File tree

874 files changed

+142986
-6410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

874 files changed

+142986
-6410
lines changed

assets/output/0001.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ time complexity?
138138
| 560 | [和为 K 的子数组](https://leetcode.com/problems/subarray-sum-equals-k) | [[]](/problem/0560.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`前缀和`](/tag/prefix-sum.md) | <font color=#ffb800>Medium</font> |
139139
| 653 | [两数之和 IV - 输入二叉搜索树](https://leetcode.com/problems/two-sum-iv-input-is-a-bst) | | [``](/tag/tree.md) [`深度优先搜索`](/tag/depth-first-search.md) [`广度优先搜索`](/tag/breadth-first-search.md) `4+` | <font color=#15bd66>Easy</font> |
140140
| 1099 | [小于 K 的两数之和](https://leetcode.com/problems/two-sum-less-than-k) | | [`数组`](/tag/array.md) [`双指针`](/tag/two-pointers.md) [`二分查找`](/tag/binary-search.md) `1+` | <font color=#15bd66>Easy</font> |
141-
| 1679 | [K 和数对的最大数目](https://leetcode.com/problems/max-number-of-k-sum-pairs) | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`双指针`](/tag/two-pointers.md) `1+` | <font color=#ffb800>Medium</font> |
141+
| 1679 | [K 和数对的最大数目](https://leetcode.com/problems/max-number-of-k-sum-pairs) | [[]](/problem/1679.md) | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`双指针`](/tag/two-pointers.md) `1+` | <font color=#ffb800>Medium</font> |
142142
| 1711 | [大餐计数](https://leetcode.com/problems/count-good-meals) | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) | <font color=#ffb800>Medium</font> |
143143
| 2006 | [差的绝对值为 K 的数对数目](https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k) | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`计数`](/tag/counting.md) | <font color=#15bd66>Easy</font> |
144144
| 2023 | [连接后等于目标字符串的字符串对](https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target) | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) `1+` | <font color=#ffb800>Medium</font> |

assets/output/0007.md

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,100 @@
66

77
Given a signed 32-bit integer `x`, return `x` _with its digits reversed_. If
88
reversing `x` causes the value to go outside the signed 32-bit integer range
9-
`-[2^31, 2^31 - 1]`, then return `0`.
9+
`[-231, 231 - 1]`, then return `0`.
1010

1111
**Assume the environment does not allow you to store 64-bit integers (signed
1212
or unsigned).**
1313

14+
15+
1416
**Example 1:**
1517

1618
> Input: x = 123
17-
>
19+
>
1820
> Output: 321
1921
2022
**Example 2:**
2123

2224
> Input: x = -123
23-
>
25+
>
2426
> Output: -321
2527
2628
**Example 3:**
2729

2830
> Input: x = 120
29-
>
31+
>
3032
> Output: 21
3133
3234
**Constraints:**
3335

34-
- `-2^31 <= x <= 2^31 - 1`
36+
* `-231 <= x <= 231 - 1`
37+
3538

3639
## 题目大意
3740

3841
给你一个 32 位的有符号整数 `x` ,返回将 `x` 中的数字部分反转后的结果。
3942

40-
如果反转后整数超过 32 位的有符号整数的范围 `[−231, 2^31 − 1]` ,就返回 0。
43+
如果反转后整数超过 32 位的有符号整数的范围 `[−231, 231 − 1]` ,就返回 0。
4144

4245
**假设环境不允许存储 64 位整数(有符号或无符号)。**
4346

4447
**示例 1:**
4548

49+
>
50+
>
51+
>
52+
>
53+
>
4654
> **输入:** x = 123
47-
>
55+
>
4856
> **输出:** 321
57+
>
58+
>
4959
5060
**示例 2:**
5161

62+
>
63+
>
64+
>
65+
>
66+
>
5267
> **输入:** x = -123
53-
>
68+
>
5469
> **输出:** -321
70+
>
71+
>
5572
5673
**示例 3:**
5774

75+
>
76+
>
77+
>
78+
>
79+
>
5880
> **输入:** x = 120
59-
>
81+
>
6082
> **输出:** 21
83+
>
84+
>
6185
6286
**示例 4:**
6387

88+
>
89+
>
90+
>
91+
>
92+
>
6493
> **输入:** x = 0
65-
>
94+
>
6695
> **输出:** 0
96+
>
97+
>
6798
6899
**提示:**
69100

70-
- `-2^31 <= x <= 2^31 - 1`
101+
* `-231 <= x <= 231 - 1`
102+
71103

72104
## 解题思路
73105

@@ -90,4 +122,4 @@ or unsigned).**
90122
| 8 | [字符串转换整数 (atoi)](https://leetcode.com/problems/string-to-integer-atoi) | [[]](/problem/0008.md) | [`字符串`](/tag/string.md) | <font color=#ffb800>Medium</font> |
91123
| 190 | [颠倒二进制位](https://leetcode.com/problems/reverse-bits) | [[]](/problem/0190.md) | [`位运算`](/tag/bit-manipulation.md) [`分治`](/tag/divide-and-conquer.md) | <font color=#15bd66>Easy</font> |
92124
| 2119 | [反转两次的数字](https://leetcode.com/problems/a-number-after-a-double-reversal) | | [`数学`](/tag/math.md) | <font color=#15bd66>Easy</font> |
93-
| 2442 | [反转之后不同整数的数目](https://leetcode.com/problems/count-number-of-distinct-integers-after-reverse-operations) | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`数学`](/tag/math.md) `1+` | <font color=#ffb800>Medium</font> |
125+
| 2442 | [反转之后不同整数的数目](https://leetcode.com/problems/count-number-of-distinct-integers-after-reverse-operations) | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`数学`](/tag/math.md) `1+` | <font color=#ffb800>Medium</font> |

0 commit comments

Comments
 (0)