NeetCode #702LC-1671Hard1-D Dynamic Programming
← Back to All Problems#702 · #1671 · Minimum Number of Removals to Make Mountain Array(得到山形数组的最少删除次数)
📌 Problem Statement & Constraints
Given
nums, return the minimum number of elements to remove so that the remaining array is a mountain array: strictly increasing up to a peak index and strictly decreasing afterwards, with at least three elements. Constraints: 1 <= nums.length <= 1000, 1 <= nums[i] <= 10^9.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!