We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c9229c commit 865c257Copy full SHA for 865c257
oh-chaeyeon/1주차_배열/n^2_배열_자르기.js
@@ -0,0 +1,9 @@
1
+function solution(n, left, right) {
2
+ const answer = [];
3
+ for (let k = left; k <= right; k++) {
4
+ const i = Math.floor(k / n);
5
+ const j = k % n;
6
+ answer.push(Math.max(i, j) + 1);
7
+ }
8
+ return answer;
9
+}
0 commit comments