You are viewing a single comment's thread. Return to all comments →
First you need to solve for y where there is no remainder as discussed above.
Then you need make sure the velocity is correct in that one of the kangaroos will eventually catch up to the other kangaroo.
// javascript solution var remainder = (x1 - x2) % (v2 - v1) == 0; var properVelocity = ((x1-x2 > 0) && v2 > v1) || ((x1-x2 < 0) && v1 > v2); return remainder && properVelocity ? 'YES': 'NO';
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 →
First you need to solve for y where there is no remainder as discussed above.
Then you need make sure the velocity is correct in that one of the kangaroos will eventually catch up to the other kangaroo.