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

Commit 80796f0

Browse files
solve: 이차원 배열 대각선 순회하기
1 parent 1dd1780 commit 80796f0

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎Level0/PRO181829.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Solution 1
2+
function solution(board, k) {
3+
let sum = 0;
4+
5+
for (let i = 0; i < board.length; i++) {
6+
for (let j = 0; j < board[i].length; j++) {
7+
if (i + j <= k) {
8+
sum += board[i][j];
9+
}
10+
}
11+
}
12+
13+
return sum;
14+
}

‎README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,3 +299,9 @@
299299
| 23.11.28. | `Level 0` | [분수의 덧셈](https://school.programmers.co.kr/learn/courses/30/lessons/120808) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO120808.js) |
300300
| 23.11.29. | `Level 0` | [2차원으로 만들기](https://school.programmers.co.kr/learn/courses/30/lessons/120842) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO120842.js) |
301301
| 23.11.30. | `Level 0` | [팩토리얼](https://school.programmers.co.kr/learn/courses/30/lessons/120848) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO120848.js) |
302+
303+
### 2023년 12월
304+
305+
| 날짜 | 난이도 | 문제 | JS 풀이 |
306+
| :-------: | :-------: | :---------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: |
307+
| 23.12.01. | `Level 0` | [이차원 배열 대각선 순회하기](https://school.programmers.co.kr/learn/courses/30/lessons/181829) | [JS](https://github.com/JeongHwan-dev/Algorithm-solving-with-js/blob/master/Level0/PRO181829.js) |

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /