IT company classic reasoning interview questions - get a diamond

CSDN University Club Interview questions logic 

Liang wood water Chen

GraduateBeijing University of Posts and Telecommunications

Title:

On the first floor to the ten floor, every floor of the elevator has a diamond, diamondDifferent sizes. You take the elevatorFrom the first floor to the ten floor, every floor elevator door will open once, can only take a diamond, ask how to get the most
Big one?

Requirements and Awards (reward activities are over):

Give your analytical thinking, a clear description of the clear and logical, will be sent to the University ClubThirtyIntegral andThirty C currency.

Establish
2015-03-16
browse
100180 times
Latest reply
2015-09-15
Reply
Fifty-eight
Zambia
Two
  • Fifteen
  • Three
  • Three
  • Two
  • Two

Gong Dongdong

GraduateNortheast Forestry University

This problem is impossible to get the largest diamond one hundred percent, and can get the diamond is the largest one probability is very low, which is close to 1/10 and you were randomly selected out of a diamond is the maximum probability is similar, but we can get through the analysis of the optimal solution, which is to get as big as possible diamonds, for example I don't take the first 5 layer diamond, only observe, judge behind the diamond size through observation, if the largest diamond diamond than in the previous 5 layer is removed, otherwise the last of a diamond, it will in the diamond random distribution condition has a great probability to get the diamond close to the maximum, even is to get the largest diamond.

March 17, 2015 13:12:53

Liang wood water Chen

GraduateBeijing University of Posts and Telecommunications

Congratulations to you.University ClubThirtyIntegral andThirty C currency.

March 17, 2015 16:03:06

Love Mylikes

GraduateYancheng Institute Of Technology

The first 3 layers of statistical data, to determine the size distribution, estimate the size of the diamond, the middle of the three 3 layer to assess their own statistics, calculate the mean and variance, if observed x>=Mu + sigma diamonds directly, has high probability of diamond for =15.85% is greater than 10%, is a more conservative approach.

March 17, 2015 16:40:34

Love Mylikes

GraduateYancheng Institute Of Technology

The first 3 layers of statistical data, to determine the size distribution, estimate the size of the diamond, the middle of the three 3 layer to assess their own statistics, calculate the mean and variance, if observed x>=Mu + sigma diamonds directly, has high probability of diamond for =15.85% is greater than 10%, is a more conservative approach.

March 17, 2015 16:40:38

Single_cha

StudentHarbin industrial large

The first method: directly take the first layer of the (in case the biggest one is the first layer of it)

Second methods: ten pieces of writing paper, to draw lots to decide where to take the diamond layer (luck, risk)

The third method: if the maximum the heart than the other obvious) with two layers of all don't take, the third layer, if the third layer of diamond significantly than the first two layers, can consider will take the star, if there is no difference in size to observe until, with the coming of a single diamond, obviously than before floor big diamond. (risk is lower than the first)

Fourth ways: (if all the diamond size difference is not big): a layer of a layer, perhaps to which layer suddenly want to take. (by observing the size of each diamond by instinct)

In general, it takes a lot of luck to get it..

 

March 17, 2015 21:51:55

Luo Junbin

StudentGuangdong University of Technology

General interview questions are like no standard answerShades_smile, this problem is the same.

My answer is: first at the front of the N floor after layer by layer at which layer of the diamond is greater than the front n layer in the biggest heart that, if a star is greater than the maximum sinking, right away, otherwise take the last star.

Of course if the reality, I will choose the seventh layer, because seven is my lucky number, there is in reality, if anything, it is an unexpected windfall, even if did not get the largest diamond, oneself is earned.Regular_smile

March 17, 2015 22:28:21

Shenjieyao

StudentAnhui University Of Science And Technology

First every layer to see which is the biggest ah! And then from the ten floor down to take the biggest not on the line?

March 18, 2015 00:02:44

The sky after the rain

GraduateQingdao Technological University

Why I feel no matter how to get the probability is 1/10.

March 18, 2015 14:12:54

Sleepandeat

StudentChangshu Institute Of Technology

To get the maximum, I can not think of the optimal solution, the only gold may take, in the full sample number to 10, before the extraction m layer for sample, because of the stochastic nature of diamond, we can roughly that the average size of the M diamond represents the average level of the 10 Star Diamond, then from the beginning of M + 1 layer, to take more than the average value of the diamond.

But it will appear before M star is the biggest again optimization this model, might as well put the m layer after every time I see the diamond is also included in the sample in, that is to say, before the take away until the diamond diamond all samples.

But if the diamond in accordance with the order from large to small in one to ten, then in accordance with the above algorithm is no diamond can take, so the provisions of the last layer of time, if not take the diamond, then take the last layer of the diamond.

March 18, 2015 16:52:09

Lyz1052

GraduateShanghai Univer

The title is to take the largest one, not as far as possible to get the biggest one....

In this way, I think, with a cutting machine on the elevator, directly take the first layer of the one, and then each layer of diamonds are cut into smaller than the first layer, the first layer of course, is the largest one

March 18, 2015 18:45:06

Vertical and horizontal vehicle

StudentKnowledge and practice of Hubei University

Apparently impossible must get to the maximum, unless some unorthodox methods, such as to destroy all of 9 layer to see the diamond, and then take the last layer.

Logically, you can find a larger,

For example, the size of the diamond on each layer is recorded,

Then calculate the average value of the size of the known diamond is considered as the overall average,

Calculate the average of adjacent size diamond the size of the gap, and then by the number of data and the overall number of calculated the difference between the adjacent to the overall size of diamond, each floor are recorded and calculated so these prediction value will become more and more close to the actual value)

It can be inferred that the maximum size of the diamond (average +4.5* average difference). In order to reduce the risk, to see the diamond > = predictive value -1* average difference when it thinks it is the biggest.

Here is that the diamond the size of the arithmetic progression distribution, diamond size under natural conditions should is similar to the normal distribution, but I think since this is the artificial test should choose some of the gap between the more obvious distribution more uniform diamond. I think this more ground in arithmetic progression of distribution, of course, can also be from the front to the data to analyze closer to what the distribution model, but this amount of data is relatively small, this is not quite accurate.

March 18, 2015 18:51:34

Rose 92727fly

StudentJilin University

How to touch can not get the biggest one, statistics the size of the first five diamonds, after the five layer appears in the top five layers of the.

March 19, 2015 07:35:31

Fushichou

GraduateThe Harbin Polytechnic University

Take first floor of the diamond, then in each floor to the hands of diamond and the building of diamond compared, if is on the first floor of the diamond than diamonds in the hands of the hands of the diamond for the layer of diamond.
PS: because the "only once" is the objection, so it is a total of only one, or can only take one time?. But if the in paddy fields has been walking, can not turn back, please pick out one of the biggest rice "such topic words like, then the above is the right answer!)

March 19, 2015 09:21:08

Liang wood water Chen

GraduateBeijing University of Posts and Telecommunications

Congratulations to you.University ClubThirtyIntegral andThirty C currency.

March 19, 2015 09:56:27

Liang wood water Chen

GraduateBeijing University of Posts and Telecommunications

I believe your lucky numbers will bring you luck.

Congratulations to you.University ClubThirtyIntegral andThirty C currency.

 

March 19, 2015 10:15:33

Liang wood water Chen

GraduateBeijing University of Posts and Telecommunications

The title said that this building in addition to the elevator there is a staircase outside it...

March 19, 2015 10:17:22

Liang wood water Chen

GraduateBeijing University of Posts and Telecommunications

 

Indeed, if the diamond in accordance with the order from large to small in one to ten floor, then in accordance with the sample and then compared to the way, and finally only get the smallest diamond. For this particular case, there are ways to save it?

According to the analysis you have given, congratulations to you.University ClubThirtyIntegral andThirty C currency.

 

March 19, 2015 10:21:15

Yongheng5871

StudentDalian University of Technology

 

Take the elevator to the top layer of the diamond to know which one of the largest after the elevator to take the stairs to the designated floor to get it. He did not say that he could not go out.

 

March 19, 2015 10:21:43

Liang wood water Chen

GraduateBeijing University of Posts and Telecommunications

How this sounds a taste in it...

March 19, 2015 10:22:40

Yongheng5871

StudentDalian University of Technology

I think actually this question is how to test from different sides to analyze the problem, as long as you find a different direction to the other people are the right solution!

March 19, 2015 10:24:06
Top_arrow