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.
hey you doesn't need to find the mid point but you can consider q as a mid point like p=(1,1) q=(5,5) and then you need to find the r with will be at equal distance from the q like as p is, and it would be 180 i.e. p,q,r must pe point of the same strainght line so r=(q1+(q1-p1), q2+(q2-p2))
i.e. r=(5+(5-1),5+(5-1))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Point
You are viewing a single comment's thread. Return to all comments →
hey you doesn't need to find the mid point but you can consider q as a mid point like p=(1,1) q=(5,5) and then you need to find the r with will be at equal distance from the q like as p is, and it would be 180 i.e. p,q,r must pe point of the same strainght line so r=(q1+(q1-p1), q2+(q2-p2))
i.e. r=(5+(5-1),5+(5-1))