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.
Yeah, I started out using the same approach as the Project Euler version, and timed out on the last 7 test cases. I had to revise my approach.
Don't start with M and try to find what cuboids are possible. Start with the condition that the shortest cuboid route length is integer and use that to see which M's you can "hit"
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #86: Cuboid route
You are viewing a single comment's thread. Return to all comments →
Yeah, I started out using the same approach as the Project Euler version, and timed out on the last 7 test cases. I had to revise my approach.
Don't start with M and try to find what cuboids are possible. Start with the condition that the shortest cuboid route length is integer and use that to see which M's you can "hit"