Search
⌘K

Leetcode 3413. Maximum Coins From K Consecutive Bags

Given non-overlapping segments where every integer position in [li, ri] holds ci coins, find the maximum total coins covered by any contiguous window of k integer positions. Coordinates and k are up to 1e9, so the challenge is to slide/sweep a length-k window efficiently over sparse weighted intervals without expanding individual positions.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.