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.
I do a precheck for the condition where the kanagaroos travel at the same speed but at different locations (i.e. if(x1 > x2 && v1 > v2) or if(x2 > x1 && v2 > v1)). Beyond that I'm having logic errors when it comes to testing their convergence point.
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 →
I do a precheck for the condition where the kanagaroos travel at the same speed but at different locations (i.e. if(x1 > x2 && v1 > v2) or if(x2 > x1 && v2 > v1)). Beyond that I'm having logic errors when it comes to testing their convergence point.