Interview Question


Country: United States




Comment hidden because of low score. Click to expand.
2
of 4 vote

i know Geometric solution for this but if i say using area then i do like

1) Calculate area of triangle
2) Calculate area of 3 triangles that formed using two points from actual triangle and third point that we checking its inside or outside

if point is inside then these three area sum be equal to our initial traingle area.....

i think if its equal then point is inside else if its less or greater then its outside

- Satveer Singh June 05, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

The sum of three areas can never be less than the initial triangle area.

- Rakesh Roy June 07, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 2 vote

Let P be the pt then cal ar(PAB)+ar(PAC)+ar(PBC)....
if it is equal to ar(ABC) then it lies within traingle ABC :)

- Zak June 05, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

also check if anyof the area =0 ie pt lies on triangle!!

- Zak June 05, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Rasterization involves this problem .

- sss June 15, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More