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