1423. 可获得的最大点数
1423. 可获得的最大点数
- 难度:
medium
- 原始链接: https://leetcode.cn/problems/maximum-points-you-can-obtain-from-cards
- 标签:
滑动窗口
解法一: 正向计算
1 | func maxScore(cardPoints []int, k int) int { |
解法二: 反向计算
1 | func maxScore(cardPoints []int, k int) int { |
medium
滑动窗口
1 | func maxScore(cardPoints []int, k int) int { |
1 | func maxScore(cardPoints []int, k int) int { |