Cats and a Mouse
Solution in Javascript const x = 1; const y = 2; const z = 3; function catAndMouse(x, y, z) { const A = Math.abs(z-x); const B = Math.abs(z-y); if (A B){ console.log('Cat B'); }else if (A === B){ console.log('Mouse C'); } } catAndMouse(x, y, z); Reference www.hackerrank.com/challenges/cats-and-a-mouse/problem
Algorithms
2020. 9. 17. 20:14
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- compareTo()
- Collection Framework
- easy algorithm
- equals()
- 알고리즘
- 프로그래머스 알고리즘문제
- spring boot application
- Javascript Algorithm
- ... in Javascript
- hackerrank javascript solution
- rest parameter
- substring()
- javascript
- hackerrank javascript
- math.abs
- C++
- hackerrank
- code refactoring
- java
- 프로그래머스
- easy javascript algorithm
- hackerrank solution
- HackerRank Algorithm
- 프로그래머스 알고리즘
- Object type casting
- algorithm
- HashMap
- repeat()
- string class in java
- 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 |
글 보관함