NeetCode #825LC-1793HardGreedy
← Back to All Problems#825 · #1793 · Maximum Score of a Good Subarray(好子数组的最大分数)
📌 Problem Statement & Constraints
You are given an array
nums and an integer k. A good subarray is one that contains index k. The score of a subarray is its minimum value multiplied by its length. Return the maximum score over all good subarrays. Constraints: 1 <= nums.length <= 10^5, 1 <= nums[i] <= 2 * 10^4, 0 <= k < nums.length.🔒
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!