Question Given a square matrix, calculate the absolute difference between the sums of its diagonals. 2d array 의 서로 다른 두 개의 대각선 값의 Absolute difference 즉, 절대값을 결과로 보여주는 문제. For example, 1 2 3 4 5 6 9 8 9 (1 + 5 + 9) - (3 + 5+ 9) |15 - 17| the absolute difference is 2. Tip. 0 1 2 0 o x o 1 x o x 2 o x o 필요한 부분이 나오는 배열의 형태를 먼저 적어주고 그 형태가 나올 수 있는 loop의 형태를 고민해 본다. 2d Array는 loop를 적용시키면 Column(세로) 이 순..
Algorithms
2020. 7. 27. 23:38
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- hackerrank
- string class in java
- Collection Framework
- easy javascript algorithm
- Javascript Algorithm
- HackerRank Algorithm
- repeat()
- algorithm
- hackerrank javascript solution
- 프로그래머스 알고리즘
- math.abs
- 알고리즘
- C++
- equals()
- compareTo()
- math.max
- java
- 프로그래머스 알고리즘문제
- spring boot application
- 프로그래머스
- rest parameter
- javascript
- easy algorithm
- HashMap
- hackerrank solution
- Object type casting
- ... in Javascript
- substring()
- code refactoring
- hackerrank javascript
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
글 보관함