We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Number Line Jumps
Number Line Jumps
Sort by
recency
|
3840 Discussions
|
Please Login in order to post a comment
Guys usually i'd solve easily but on this question i've got stuck at test case 18
function kangaroo(x1, v1, x2, v2) { let first=x1+v1; let second=x2+v2; for(let a=0;a<1000000;a++){ first+=v1; second+=v2; if(first===second){ console.log(first,second) return 'YES' } ` } return 'NO'
}
` public static String kangaroo(int x1, int v1, int x2, int v2) {
`
Solution in C++:
this my python solution