beautiful day at the movies hackerrank solution

Solutions on MaxInterview for beautiful day at the movies hackerrank solution by the best coders in the world

showing results for - "beautiful day at the movies hackerrank solution"
Jamie
21 Sep 2016
1 const reversedNum = num => parseFloat(num.toString().split('').reverse().join('')) * Math.sign(num)
2function beautifulDays(i, j, k) {
3    let count = 0;
4    for(let s=i;s<j+1;s++) {
5       if(((s - reversedNum(s))/k)%1===0) {
6           count++
7       }
8    }
9    return count
10}