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.
If (0 ,0) is in the perimeter, the problem statement does not make clear if it should be considered an interior point. Neither did the original project euler statement, but there didn't affect the outcome since there were no triangle with sides intersecting (0, 0).
But here thet distinction matters, particularly in Test #1. And the answer is YES, if (0, 0) is in one side of the triangle, then it is considered interior.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #102: Triangle containment
You are viewing a single comment's thread. Return to all comments →
If (0 ,0) is in the perimeter, the problem statement does not make clear if it should be considered an interior point. Neither did the original project euler statement, but there didn't affect the outcome since there were no triangle with sides intersecting (0, 0).
But here thet distinction matters, particularly in Test #1. And the answer is YES, if (0, 0) is in one side of the triangle, then it is considered interior.