mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-10 08:50:20 +08:00
Fomrat the JS and TS codes with prettier.
This commit is contained in:
@ -57,7 +57,9 @@ function linearRecur(n) {
|
||||
/* 平方阶 */
|
||||
function quadratic(n) {
|
||||
// 矩阵占用 O(n^2) 空间
|
||||
const numMatrix = Array(n).fill(null).map(() => Array(n).fill(null));
|
||||
const numMatrix = Array(n)
|
||||
.fill(null)
|
||||
.map(() => Array(n).fill(null));
|
||||
// 二维列表占用 O(n^2) 空间
|
||||
const numList = [];
|
||||
for (let i = 0; i < n; i++) {
|
||||
|
Reference in New Issue
Block a user