Mathematics (JEE)ModerateCodeforces Div2 D

How many permutations p of {1, 2, 3, 4, 5} have exactly one interior peak, meaning exactly one index i in {2, 3, 4} with p(i-1) < p(i) > p(i+1)?

  1. A. 104
  2. B. 88
  3. C. 16
  4. D. 120

Correct answer: B. 88

Enumerating all 120 permutations and counting those with exactly one interior peak gives 88.

More Permutations, Combinations and Probability questions

Exams that ask this topic