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 made a stupid error. When triangle lies inside the circle, but touches it by vertex, expectad answer is YES, don't be like me.
The overall idea is to check trivial cases (triangle is fully inside, partly inside - check distances to vertices). Then, to detect touching by side, you can use distance from point to line and previous problem in Geometry section - Jim Beam.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Geometry
You are viewing a single comment's thread. Return to all comments →
I made a stupid error. When triangle lies inside the circle, but touches it by vertex, expectad answer is YES, don't be like me.
The overall idea is to check trivial cases (triangle is fully inside, partly inside - check distances to vertices). Then, to detect touching by side, you can use distance from point to line and previous problem in Geometry section - Jim Beam.