Find Digits
Solution I in Javascript function solve(n) { //toString: number to string // 1012 //split: split("")는 string split into an array of substrings //하나하니의 element로 나누기 위해서 기준을 빈칸이없는 ''로 잡는다 // [1,0,1,2] //filter: 전체 element중 조건을 통과한 element로 new array 만든다 return n.toString().split('').filter(i => n % i === 0).length } console.log(solve(1012)); //3 Solution II in Javascript function solve(n) { let st..
Algorithms
2020. 9. 13. 11:30
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- string class in java
- C++
- code refactoring
- ... in Javascript
- repeat()
- math.abs
- HashMap
- 프로그래머스 알고리즘
- Object type casting
- HackerRank Algorithm
- 프로그래머스
- algorithm
- easy javascript algorithm
- hackerrank javascript
- javascript
- 프로그래머스 알고리즘문제
- rest parameter
- hackerrank javascript solution
- substring()
- equals()
- Collection Framework
- spring boot application
- Javascript Algorithm
- 알고리즘
- hackerrank solution
- easy algorithm
- java
- compareTo()
- hackerrank
- math.max
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 31 |
글 보관함