← Questions

Maximum coins from k consecutive bags

0
AmazonCodingLast asked Sep 2026

A coding interview question asked in Amazon's online assessment, last asked Sep 2026. It tests sliding window, intervals and prefix sums.

Bags stand at every positive integer position 1, 2, 3, …. You get segments, where [l, r, v] means every bag from position l to r inclusive holds v coins.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Amazon · Online assessment · Last asked Sep 2026Coding problems plus a repository bug-fix section with a built-in assistant or a design scenario, then a work-style survey · AI only inside the bug-fix section's built-in assistant

What it tests

sliding window · intervals · prefix sums

Your code and the AI tutor open when you unlock this question.