# C++ Solution to Coding Challenge 941. Valid Mountain Array

# Problem statement

Given an array of integers `arr`

, return `true`

if and only if it is a valid *mountain array*.

Recall that arr is a mountain array if and only if:

`arr.length >= 3`

- There exists some
`i`

with`0 < i < arr.length - 1`

such that: