Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b7b6f9

Browse files
author
luzhipeng
committed
fix: typo
1 parentdeeac5a commit6b7b6f9

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

‎problems/279.perfect-squares.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -117,29 +117,6 @@ for (let i = 1; i <= n; i++) {
117117
* Output: 2
118118
* Explanation: 13 = 4 + 9.
119119
*/
120-
121-
constmapper= {};
122-
123-
functiond(n,level) {
124-
if (n===0)return level;
125-
126-
let i=1;
127-
constarr= [];
128-
129-
while (n- i* i>=0) {
130-
consthit= mapper[n- i* i];
131-
if (hit) {
132-
arr.push(hit+ level);
133-
}else {
134-
constdepth=d(n- i* i, level+1)- level;
135-
mapper[n- i* i]= depth;
136-
arr.push(depth+ level);
137-
}
138-
i++;
139-
}
140-
141-
returnMath.min(...arr);
142-
}
143120
/**
144121
*@param{number}n
145122
*@return{number}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp