fix: doesnt return anything

pull/196/head
RiverTwilight 2 years ago
parent 8c736252ab
commit f83dcce346

@ -24,9 +24,10 @@ class time_complexity {
arrayTraversal(nums) { arrayTraversal(nums) {
var count = 0; var count = 0;
// 循环次数与数组长度成正比 // 循环次数与数组长度成正比
nums.forEach(() => { for (var i = 0; i < nums.length; i++) {
count++; count++;
}); }
return count;
} }
/* 平方阶 */ /* 平方阶 */

Loading…
Cancel
Save