House Robber IV (Reskinned)

Given an integer array nums, where nums[i] is the amount at position i, and an integer k. You may not pick two adjacent positions. You must pick at least k pairwise non-adjacent positions. The "...

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: