Microsoft Interview Question – Compute the Area of the Triangle


The following seems an easy question, to get the area of the rectangluar triangle with the slope equals to 10 and the height equals to 6.

triangle Microsoft Interview Question - Compute the Area of the Triangle

rectangluar triangle

If your answer is 30 (10×6/2), then you are falling into the trap: Such triangle doesn’t exist at all!

It does not exist!

If we label the triangle with the following,

triangle-labels Microsoft Interview Question - Compute the Area of the Triangle

Triangle with Labels

What we can get are:

tex_4f814a1217a6831bbc03afc9a75ad41f Microsoft Interview Question - Compute the Area of the Triangle
tex_41a661184ef62c05c3babfb5ff0651e8 Microsoft Interview Question - Compute the Area of the Triangle

If we add these two equations:

tex_d87681d39b0bc775fda529b522c2824b Microsoft Interview Question - Compute the Area of the Triangle

After simplification, we have:

tex_b8f301d39fae8e7dcdc25b916ba1f88c Microsoft Interview Question - Compute the Area of the Triangle
tex_5ddfffe16cc6b2c0456f0deb19e18b13 Microsoft Interview Question - Compute the Area of the Triangle
tex_0a33a75166efb5b3b3e8cffcc4859aee Microsoft Interview Question - Compute the Area of the Triangle
tex_5f66e5f1119fad0b135eca1f97f3b384 Microsoft Interview Question - Compute the Area of the Triangle

Thus,

tex_f81cfccd924d8a8d9242e2987627715b Microsoft Interview Question - Compute the Area of the Triangle because tex_a98e62ed64d140985c87c4e2aabb0bc7 Microsoft Interview Question - Compute the Area of the Triangle.

If, tex_8f059fdf555f1bf1176803e20f6110ca Microsoft Interview Question - Compute the Area of the Triangle, tex_8034e0663ee10d48b52b2e9e30b04416 Microsoft Interview Question - Compute the Area of the Triangle, we can plot the graph,

plot-for-triangle-max Microsoft Interview Question - Compute the Area of the Triangle

plot-for-triangle-max

The maximum value for function y is 25, which means that the maximum value of c is tex_637b53007840bc38e877e13bdf2395c2 Microsoft Interview Question - Compute the Area of the Triangle

Such triangle does not exist (the height is 6, which exceeds the maximum length)!

Typical Microsoft. If something is wrong then it is by design and you are stuck with it.

Software Engineer Interview Experience

Interview Tips

Interview Questions

–EOF (The Ultimate Computing & Technology Blog) —

766 words
Last Post: How to Lock out (WorkStation) on Windows?
Next Post: How to Cache WeChat Token via PHP?

The Permanent URL is: Microsoft Interview Question – Compute the Area of the Triangle (AMP Version)

3 Comments

  1. Nedeljko Stefanovic
  2. dC
  3. M.B.

Leave a Reply