
Mountain Peaks

A computerized geographic information system represents the profile of a mountain through a sequence of integers, where no two consecutive numbers are the same. A peak is detected as three consecutive numbers where the middle number is bigger than the other two or two consecutive numbers at left/right end of a sequence where the left/rightmost number is bigger.
Your program must analyze this sequence to determine whether the mountain represented has more than one peak (return True
). If not enough data or just a single peak - return False
.
Input: List of integers (int).
Output: Logical value (bool).
Examples:
assert check_peaks([2, 3, 5, 6, 7, 5, 4, 2]) == False assert check_peaks([2, 3, 6, 5, 4, 6, 3, 2]) == True assert check_peaks([1, 2, 3, 2, 1]) == False assert check_peaks([1, 3, 2, 1, 2, 3, 1]) == True