Qm

In a random row, how many dip below both neighbors?

Seven distinct numbers are placed in a single row in a completely random order. Call a position a "valley" if its number is smaller than every number directly next to it. The two positions at the ends each have just one neighbor.

On average, how many valleys are there in the row of 7?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Around a round table, how many beat both neighbors?In a random row, how many are taller than their neighbors?Around a ring of nine, how many top both neighbors?Interior peaks in a random sequence of readingsHow many rising steps in a shuffled list?
All questions →