← Questions

Longest uptime run after repairing one window of exactly k entries

0
AmazonCodingLast asked Oct 2026

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

You get a server's health record as a binary string with one character for each time step; a 1 says the server was up, 0 means it was down. You may run one maintenance operation, at most: it picks a block of exactly k adjacent positions…

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 Oct 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 · prefix sums · strings

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