Microsoft Interview Question






Comment hidden because of low score. Click to expand.
0
of 0 vote

Dot product = Sum (xi*yi), i=0..n
Cross product = matrix determinant (http://en.wikipedia.org/wiki/Cross_product)

from site: http://members.tripod.com/~Paul_Kirby/vector/Vplane.html
a plane formula is calculated by its normal:
Let a, b, c be the position vectors of 3 points in the plane. Then all we have to do to find the equation of the plane is construct a normal vector - then we can use this and any of the 3 points to find the equation as before.
The two vectors,
b - a (A to B)
c - a (A to C)
both lie in the plane, so if we take their cross product we find our normal vector:
n = (b - a) x (c - a) => cross product
the distance between the plane and the point is:
from :http://www-math.mit.edu/~djk/18_022/chapter02/example01.html
lets set p to be a point in the space, than:
((p-a),n)/(n,n)

Form the vector p - a and take its dot product with n divided by the magnitude of n.
The magnitude of the result will be the required distance.

- Eila June 11, 2006 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What team asked you that?

- SomeSDE June 11, 2006 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

say A,B,C are the points on plane, find the cross product ABXBC to get the normal vector say [n1, n2, n3] be it. And then find the plane equation by n1*x + n2*y + n3*z + n4 = 0. (by substituting one of A,B,C get n4).

distance is |n1*x1+..|/Sqrt(n1^2+..)

- Anonymous January 13, 2010 | 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