โ† Amazon questions

Gravity Shift Box Simulation

Filed under Amazon

Given an array of integers representing the heights of boxes in a container, return the array sorted in non-decreasing order to simulate gravity shifting towards the right.

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.