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
|
3936 Discussions
|
Please Login in order to post a comment
GOLANG - Simple Solution:
Here is my c++ solution, you can have the explanation here : https://youtu.be/bRVVCCmXN0Y
string kangaroo(int x1, int v1, int x2, int v2) {
}
I am struggling to understand why on earth this usecase expects YES: x1 = 0 x2 = 3 v1 = 4 v2 = 2 If the first jump gets x1 at position 4 and x2 at position 5 then in teh second jump x1 surpass x2 and stays ahead from there onwards.