Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 7959b89

Browse files
committed
932 修改了注释中的错误
1 parent cdbc51a commit 7959b89

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Algorithms/0932.beautiful-array/beautiful-array.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ func beautifulArray(N int) []int {
2828
* [1]
2929
* [1 2]
3030
* [1 3 2 4]
31-
* [1 5 3 7 2 6 4 8] ↓ 长度 double 后超过 N,进行裁剪。裁剪不改变 beautiful
32-
* [1 5 3 7 2]
33-
* [1 9 5 3 7 2 10 6 4 8]
31+
* [1 5 3 7 2 6 4 8]
32+
* [1 9 5 13 3 11 7 15 2 10 6 14 4 12 8 16]
33+
* 长度超过 N,进行裁剪,删除 >N=10 的数字。裁剪不改变 beautiful
34+
* [1 9 5 3 7 2 10 6 4 8]
3435
*
3536
* 每个下一行的
3637
* 左半部分,都是 上一行×2-1
3738
* 右半部分,都是 上一行×2
38-
* 由文章中证明,× 和 - 也不会改变 beautiful
39+
* 由文章中证明,× 和 - 不会改变 beautiful
3940
* 所以,左右两边都是 beautiful 的
4041
*
4142
* 左右合并的时候,只需要讨论 Ai 和 Aj 分别位于左右两边的情况。

0 commit comments

Comments
 (0)