Interior peaks in a random sequence of readings
Eight distinct temperature readings are recorded in a row in a completely random order. We only count "interior peaks": positions 2 through 7 (not the two ends) whose reading is higher than both of its immediate neighbors.
On average, how many interior peaks are there?
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
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- 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?In a random row, how many dip below both neighbors?Around a ring of nine, how many top both neighbors?How many rising steps in a shuffled list?
All questions →