Sponsored
Use these hints if you're stuck. Try solving on your own first.
Search for the largest integer in the range [0, n - k]
This integer is the first element in the subarray. You should take it with the k - 1 elements after it.
Solve with full IDE support and test cases