update 0055.跳跃游戏:添加复杂度分析

This commit is contained in:
Yuhao Ju 2023-04-11 00:30:07 +08:00 committed by GitHub
parent 80006ad615
commit 85f54a718d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,10 @@ public:
};
```
* 时间复杂度: O(n)
* 空间复杂度: O(1)
## 总结
这道题目关键点在于:不用拘泥于每次究竟跳几步,而是看覆盖范围,覆盖范围内一定是可以跳过来的,不用管是怎么跳的。