1708. Largest Subarray Length K Updated: 2024-03-12 1 min read Algorithms , LeetCode On This PageLeetCode problem 1708class Solution: def largestSubarray(self, nums: List[int], k: int) -> List[int]: i = nums.index(max(nums[: len(nums) - k + 1])) return nums[i : i + k]