← Amazon questions

First negative integer in every window of size k

Filed under Amazon · Also reported at CitiusTech, Paytm, SAP

Given an array of integers and a positive integer k, find the first negative integer for each contiguous subarray (window) of size k. If a window does not contain a negative integer, output 0 for that…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.