Amazon Applied Scientist Interview | ₹98Lakhs CTC | Got Cooked in the DSA Round

Anonymous User
398
Oct 28, 2026

You are working as an Applied Scientist at Amazon, analyzing the performance of a newly deployed machine learning model used to improve product recommendations.

Over a period of (N) consecutive time intervals, your team records the change in the model's recommendation quality compared to the previous interval. A positive value indicates an improvement in performance, while a negative value indicates a decline.

These changes are represented by an integer array (A), where (A_i) denotes the performance change during the (i)-th time interval.

Your task is to identify a non-empty contiguous period of time during which the cumulative improvement in the model's performance is maximized - but if interval [i.....j] is selected then cumulative improvement sum is denoted as : -1*a[i] + a[i+1] + ..... + a[j] . Also make sure the selected interval size is >=K

Comments (5)