Movatterモバイル変換


[0]ホーム

URL:


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

Commitf93551a

Browse files
committed
final change readme
1 parent6061321 commitf93551a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

‎src/0376.Wiggle-Subsequence/README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ Output: 2
3636
##题意
3737
>求摇摆序列最长序列,可以转化为数组【上升】【下降】状态的转换
3838
39-
<palign="center"><imgsrc="../../assets/images/376_Wiggle_Subsequence.jpg"></p>
4039

4140
##题解
4241

4342
###思路1
44-
>按照小学算数那么来做,用`carry` 表示进位,从后往前算,依次往前,每算出一位就插入到最前面即可,直到把两个二进制串都遍历完即可。
43+
>分别定义上升下降2个状态,分别做判断
44+
45+
<palign="center"style="transform:rotate(90deg);margin:150px0px;">
46+
<img src="../../assets/images/376_Wiggle_Subsequence.jpg">
47+
</p>
4548

4649
```go
4750
funcwiggleMaxLength(nums []int)int {
@@ -81,12 +84,6 @@ func wiggleMaxLength(nums []int) int {
8184

8285
```
8386

84-
###思路2
85-
>思路2
86-
```go
87-
88-
```
89-
9087
##结语
9188

9289
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-leetcode][me]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp