Question #36778

There are five people standing on a line: A, B, C, D and E. Each is asked how
many people standing before them are taller than they are, and the replies from
each were respectively: 0, 1, 1, 0 and 1. Sort these five people according to their
height.
1

Expert's answer

2013-11-08T09:42:35-0500

Question.

There are five people standing on a line: A, B, C, D and E. Each is asked how many people standing before them are taller than they are, and the replies from each were respectively: 0, 1, 1, 0 and 1. Sort these five people according to their height.

Solution.

People standing on a line: A, B, C, D and E.

Number of taller persons standing before: 0, 1, 1, 0 and 1.

A is the first person and nobody is standing before him, that is why the reply from A was, obviously, zero.

From B we have received the reply that one person before is taller than B. So A is taller than B.

And one person is taller C, therefore C is taller than B, but not A. At this step three people according to their height stand in line: ACB (from the tallest person to the smallest one).

D said: "0". Nobody is taller than D. So we obtain new line: DACB.

And the last person said: "1". He is smaller than only one of them, so the place for E is between D and A.

Consequently, the line of these five people according to their height is DEACB (from the tallest one).

**Answer:** DEACB.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS