
941. Valid Mountain Array
·
Algorithm
Valid Mountain Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 0보다 같거나 큰 정수로 이루어진 1차원 배열이 주어진다. 주어진 배열이 아래 조건을 만족하는지 참, 거짓을 반환하는 문제다. 조건 1, 입력된 배열은 3보다 같거나 커야 한다. 조건 2, 입력된 배열은 mountain array라고 부르는 조건을 만족해야 한다. 조건 3, mountain array는 배열 안에 유일한 최고점이 있고 최고점을 기준으로 왼쪽, 오른쪽 값이 감소..