You are viewing a single comment's thread. Return to all comments →
function kangaroo(x1, v1, x2, v2) { let val = "NO"; for(let i=1 ; i<10000; i++){ if((x1 + i*v1) == (x2 + i*v2)){ val = "YES" } } return val; }
Seems like cookies are disabled on this browser, please enable them to open this website
Number Line Jumps
You are viewing a single comment's thread. Return to all comments →
Here's a solution in Javascript