1793. Maximum Score of a Good Subarray
1) 문제 설명
You are given an array of integers nums (0-indexed) and an integer k.
The score of a subarray (i, j) is defined as min(nums[i], nums[i+1], ..., nums[j]) * (j - i + 1). A good subarray is a subarray where i <= k <= j.
Return the maximum possible score of a good subarray.
2) 제한 사항
- 1 <= nums.length <= 105
- 1 <= nums[i] <= 2 * 104
- 0 <= k < nums.length
3) 도전 과제
X
4) 풀이
231023 기준 풀이 x
5) 소스 코드 및 결과
'알고리즘 풀이' 카테고리의 다른 글
231110 LeetCode 문제 풀이 (그래프, 인접 행렬) (0) | 2023.11.10 |
---|---|
231023 LeetCode 문제 풀이 (0) | 2023.10.23 |
231021 LeetCode 문제 풀이 (트리, 투 포인터?) (0) | 2023.10.21 |
231020 LeetCode 문제 풀이 (스택) (2) | 2023.10.20 |
221124 알고리즘 풀이 1문제 (2) | 2022.11.24 |