Option (B) is correct.
Explanation:
Number the places in the line 1 to 7.
- The children at places 1 and 7 have only one neighbour, so they can never call out 2. Only places 2 to 6 can.
- Two children standing next to each other cannot both call out 2: each would have to be shorter than the other.
So among places 2, 3, 4, 5, 6 we must leave a gap between any two children who call out 2. The most we can choose is 3 places: 2, 4 and 6.
And 3 really can happen. For example, with heights (in cm)
150, 120, 155, 125, 160, 130, 165
the children who are 120 cm, 125 cm and 130 cm each have two taller neighbours. So the greatest number is 3.
Why the other options are wrong
- (A) 2 is the greatest number for a line of 5 children. With 7 children the example above gives 3.
- (C) Any 4 of the places 2 to 6 must include two places next to each other, and two neighbours cannot both call out 2. So 4 is impossible.
- (D) 5 means everyone except the two ends, so neighbours would both be calling out 2. That is impossible.