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
- C++
- 프로그래머스 알고리즘
- easy algorithm
- repeat()
- HashMap
- compareTo()
- easy javascript algorithm
- 알고리즘
- substring()
- hackerrank solution
- rest parameter
- string class in java
- math.abs
- spring boot application
- Javascript Algorithm
- 프로그래머스 알고리즘문제
- hackerrank javascript
- HackerRank Algorithm
- ... in Javascript
- 프로그래머스
- Object type casting
- hackerrank
- algorithm
- hackerrank javascript solution
- math.max
- code refactoring
- java
- Collection Framework
- javascript
- equals()
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함