Interview question set 1

Source: Internet
Author: User

1. Microsoft interview questions: using the balance weight, divide 140 grams of salt into 50 and 90 grams three times?

There is a balance, 2 grams and 7 grams of weight each.How to Use the balance weight to divide 140 grams of salt into 50 to 90 grams in three times.
My solution:

Solution 3:

A. Use weight 2 to get 140 = 69 + 71

B. Use the weight of 2 + 7 to get 69 = 39 + 30.

C. Use the weights of 2 + 7 and 30 to obtain the remaining 50 values from 71, which are 21 = 30-9,71.


Solution 4:

A. Use weight 2 to get 140 = 69 + 71

B. Using weights 2 + 7 and 71, 71 = 40 + 31 is obtained.

C. Use only the balance. Divide all 100 except 40 into two 50, DONE!

Comrade Yu also has two types:

  • Solution:. Use the balance to divide 140 grams into 70 grams.
  • 2. Divide 70 grams into 35 or 35 grams using the balance.
  • 3. Use the balance and weight to divide 35 grams into 20 or 15 portions (20 salt + 2 Weight = 15 salt + 7 weight ).
  • 70 + 20 = 90 grams, and 35 + 15 = 50 grams
  • Solution:. Use the balance to divide 140 grams into 70 grams.
  • 2. Weigh 9 grams using the balance and weight.
  • 3. Put 9 grams of salt and 2 grams of weight on one side before the balance, and put 11 grams of equivalent salt on the other side.
  • Put 20 grams of existing salt (9 + 11) on the balance to the one that hasn't moved 70 grams before.
    Solution 2 is hard to think of, Xiaoyu V5! Click here to view the original article

    There may be more than four solutions, and we look forward to adding

    2. Microsoft interview questions: How many points on the Earth meet such conditions?

    Standing at a certain point on the earth, we walk one kilometer south and one kilometer east,Finally, we walked one kilometer north and returned to the origin. How many points on the Earth meet such conditions?

    It is easy to think of the northern point, but the answer is more than one northern point.
    Return to the origin point and draw a Curved Triangle at 1 km south, 1 km east, and 1 km north at the Arctic point. The inner angles are all 90 °;
    In fact, at the northern point, a km south, B km east, and then a km north (a can not be equal to B, a is less than half the circumference of the Earth), you can return to the origin.
    In addition, A latitude coil with A circumference of 1 km exists near the South Pole. From A point north of its latitude to A point south 1 km to A point B on this circle, and then back to B point East 1 km, 1 km to the north, and then back to. All vertices at the same latitude of point a meet the conditions. Therefore, the answer to this question is countless points, specifically (1 + countless.

    3. Microsoft interview questions: correctly mark the fruit basket

    There are three fruit baskets. One contains only apple, and the other contains only oranges,The other one has both Apple and orange. Each fruit basket has tags,But the labels are all incorrect. How to check a fruit in a fruit basket,Then Mark each fruit basket correctly?

    This question is like arrangement and combination, Apple A, orange O, and mixed AO
    In a real fruit basket (more like a black box ),
    A---O---AO
    In this arrangement, because the labels outside each basket are incorrect, the order of the labels is only
    Case 1: O---AO-A
    Case 2: AO--A--O
    In either case, tag A can correspond to the real AO (Case 1) or O (Case 2). If tag A is taken out of the black box with tag, it cannot be identified as Case 1 or case 2. So I cannot use the tag.
    Similarly, the O tag cannot be used, but can only be obtained from AO.
    If you get A from AO, It is case 2; if you get O, it is Case 1.
    Then, one-to-one correspondence is performed on KO.
    Ps: Isn't Microsoft's interview questions so easy? Is it naive to me ~ _~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.