mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 23:28:29 +08:00
@ -101,7 +101,7 @@ public:
|
||||
// 时间复杂度: 最差情况所有元素都是唯一的。复杂度和全排列1都是 O(n! * n) 对于 n 个元素一共有 n! 中排列方案。而对于每一个答案,我们需要 O(n) 去复制最终放到 result 数组
|
||||
// 空间复杂度: O(n) 回溯树的深度取决于我们有多少个元素
|
||||
```
|
||||
* 时间复杂度: O(n)
|
||||
* 时间复杂度: O(n! * n)
|
||||
* 空间复杂度: O(n)
|
||||
|
||||
## 拓展
|
||||
|
Reference in New Issue
Block a user