mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 04:31:55 +08:00
Update code comment of quadratic in time_complexity (#1155)
This commit is contained in:
@ -32,7 +32,7 @@ function arrayTraversal(nums) {
|
||||
/* 平方阶 */
|
||||
function quadratic(n) {
|
||||
let count = 0;
|
||||
// 循环次数与数组长度成平方关系
|
||||
// 循环次数与数据大小 n 成平方关系
|
||||
for (let i = 0; i < n; i++) {
|
||||
for (let j = 0; j < n; j++) {
|
||||
count++;
|
||||
|
||||
Reference in New Issue
Block a user