Amazon·Software Engineer·Online Assessment (OA)
Jun 2026
Amazon OA for a SWE role, one algorithmic problem about reordering an array to minimize cumulative variation. Pretty clean problem once you see the pattern, but I definitely stared at it longer than I should have.
- Given an array of product sizes, reorder the array to minimize the total sum of variation values, where variation at each index is the difference between the max and min of all elements seen so far. Return the minimum possible sum.
“Took me a while to realize that sorting is the key.” The rest of the author's notes on Software Engineer interview at Amazon, Online Assessment (OA) round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post