Remove a Length-k Subarray to Balance Alternating Index Sums
Given an integer array nums (0-indexed) and an integer k, remove exactly one contiguous subarray of length k. The remaining elements keep their relative order and are reindexed starting from...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
