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.
No, because the 2nd kangaroo started ahead of the 1st one and will keep getting more ahead. However, this is not because v2 - v1 = 1. This is because x1 - x2 is negative while v2 - v1 is not, so it would take negative steps to get there, which can't happen.
Cookie support is required to access HackerRank
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 →
No, because the 2nd kangaroo started ahead of the 1st one and will keep getting more ahead. However, this is not because v2 - v1 = 1. This is because x1 - x2 is negative while v2 - v1 is not, so it would take negative steps to get there, which can't happen.