Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4f8a420

Browse files
✨update: Modify 68
1 parent d139a74 commit 4f8a420

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

‎Index/模拟.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| [31. 下一个排列](https://leetcode-cn.com/problems/next-permutation/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/next-permutation/solution/miao-dong-xi-lie-100-cong-xia-yi-ge-pai-gog8j/) | 中等 | 🤩🤩🤩 |
1313
| [38. 外观数列](https://leetcode-cn.com/problems/count-and-say/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/count-and-say/solution/shua-chuan-lc-100-mo-ni-ti-shi-yong-shao-w8jl/) | 简单 | 🤩🤩 |
1414
| [43. 字符串相乘](https://leetcode-cn.com/problems/multiply-strings/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/multiply-strings/solution/zhi-yao-ni-hui-shou-suan-cheng-fa-zhe-ti-ainl/) | 中等 | 🤩🤩🤩🤩 |
15-
| [58. 最后一个单词的长度](https://leetcode-cn.com/problems/length-of-last-word/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/length-of-last-word/solution/gong-shui-san-xie-jian-dan-zi-fu-chuan-m-tt6t/) | 中等 | 🤩🤩🤩🤩 |
15+
| [58. 最后一个单词的长度](https://leetcode-cn.com/problems/length-of-last-word/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/length-of-last-word/solution/gong-shui-san-xie-jian-dan-zi-fu-chuan-m-tt6t/) | 简单 | 🤩🤩🤩🤩 |
1616
| [59. 螺旋矩阵 II](https://leetcode-cn.com/problems/spiral-matrix-ii/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/spiral-matrix-ii/solution/yi-ti-shuang-jie-xiang-jie-xing-zhuang-j-24x8/) | 中等 | 🤩🤩🤩🤩 |
1717
| [65. 有效数字](https://leetcode-cn.com/problems/valid-number/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/valid-number/solution/gong-shui-san-xie-zi-fu-chuan-mo-ni-by-a-7cgc/) | 困难 | 🤩🤩🤩 |
1818
| [66. 加一](https://leetcode-cn.com/problems/plus-one/) | [LeetCode 题解链接](https://leetcode-cn.com/problems/plus-one/solution/gong-shui-san-xie-jian-dan-mo-ni-ti-by-a-5av1/) | 简单 | 🤩🤩🤩🤩 |

‎LeetCode/61-70/68. 文本左右对齐(困难).md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@
44

55
Tag : 「模拟」、「字符串」
66

7-
给定一个单词数组和一个长度 maxWidth,重新排版单词,使其成为每行恰好有 maxWidth 个字符,且左右两端对齐的文本。
87

9-
你应该使用"贪心算法"来放置给定的单词;也就是说,尽可能多地往每行中放置单词。必要时可用空格 ' ' 填充,使得每行恰好有 maxWidth 个字符。
8+
9+
给定一个单词数组和一个长度 `maxWidth`,重新排版单词,使其成为每行恰好有 `maxWidth` 个字符,且左右两端对齐的文本。
10+
11+
你应该使用"贪心算法"来放置给定的单词;也就是说,尽可能多地往每行中放置单词。必要时可用空格 ' ' 填充,使得每行恰好有 `maxWidth` 个字符。
1012

1113
要求尽可能均匀分配单词间的空格数量。如果某一行单词间的空格不能均匀分配,则左侧放置的空格数要多于右侧的空格数。
1214

1315
文本的最后一行应为左对齐,且单词之间不插入额外的空格。
1416

1517
说明:
16-
* 单词是指由非空格字符组成的字符序列
17-
* 每个单词的长度大于 0,小于等于 maxWidth
18-
* 输入单词数组 words 至少包含一个单词
18+
* 单词是指由非空格字符组成的字符序列
19+
* 每个单词的长度大于 0ドル$,小于等于 `maxWidth`
20+
* 输入单词数组 `words` 至少包含一个单词
1921

2022
示例:
2123

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /