Format JS and TS code.

This commit is contained in:
krahets
2023-09-02 23:07:47 +08:00
parent f96f583771
commit 978857570f
35 changed files with 75 additions and 74 deletions

View File

@ -263,7 +263,7 @@
[class]{}-[func]{permutations_ii}
```
假设元素两两之间互不相同,则 $n$ 个元素共有 $n!$ 种排列(阶乘);在记录结果时,需要复制长度为 $n$ 的列表,使用 $O(n)$ 时间。因此**时间复杂度为 $O(n!n)$** 。
假设元素两两之间互不相同,则 $n$ 个元素共有 $n!$ 种排列(阶乘);在记录结果时,需要复制长度为 $n$ 的列表,使用 $O(n)$ 时间。**因此时间复杂度为 $O(n!n)$** 。
最大递归深度为 $n$ ,使用 $O(n)$ 栈帧空间。`selected` 使用 $O(n)$ 空间。同一时刻最多共有 $n$ 个 `duplicated` ,使用 $O(n^2)$ 空间。**因此空间复杂度为 $O(n^2)$** 。

View File

@ -340,13 +340,13 @@ $$
=== "JS"
```javascript title="built_in_hash.js"
// JavaScript 未提供内置 hash code 函数
```
=== "TS"
```typescript title="built_in_hash.ts"
// TypeScript 未提供内置 hash code 函数
```
=== "C"

View File

@ -66,7 +66,7 @@
=== "TS"
```typescript title="binary_search_tree.ts"
[class]{}-[func]{search}
[class]{BinarySearchTree}-[func]{search}
```
=== "C"
@ -152,7 +152,7 @@
=== "TS"
```typescript title="binary_search_tree.ts"
[class]{}-[func]{insert}
[class]{BinarySearchTree}-[func]{insert}
```
=== "C"
@ -263,7 +263,7 @@
=== "TS"
```typescript title="binary_search_tree.ts"
[class]{}-[func]{remove}
[class]{BinarySearchTree}-[func]{remove}
```
=== "C"