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.
Just solve the equation x1 + y * v1 = x2 + y * v2 where "y" is number of jumps by moving y to one side and everything else to another. If y is not a fraction then it is possible.
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 →
Just solve the equation x1 + y * v1 = x2 + y * v2 where "y" is number of jumps by moving y to one side and everything else to another. If y is not a fraction then it is possible.