Breaking the Records
Solution in JavaScript const scores = [10, 5, 20, 20, 4, 5, 2, 25, 1]; function breakingRecords(scores) { let [max, min] = [scores[0], scores[0]]; //중복배열로 선언 let [maxCount, minCount] = [0, 0]; for (let i = 1; i max) { //array로 넣어야지... max = scores[i]; maxCount++ } if (scores[i] < min) { min = scores[i]; minCount++ } } return [maxCount, minCount]; //두개 이상의 ..
Algorithms
2020. 9. 4. 21:26
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- math.abs
- 프로그래머스 알고리즘
- algorithm
- rest parameter
- HashMap
- code refactoring
- easy algorithm
- Object type casting
- javascript
- hackerrank javascript
- 프로그래머스
- hackerrank javascript solution
- substring()
- C++
- 프로그래머스 알고리즘문제
- easy javascript algorithm
- 알고리즘
- string class in java
- repeat()
- java
- hackerrank
- Javascript Algorithm
- Collection Framework
- math.max
- compareTo()
- HackerRank Algorithm
- ... in Javascript
- hackerrank solution
- equals()
- spring boot application
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함