Loading page…
An online store inserts thirty thousand rush tickets at the front of an array of a hundred thousand. Each insert moves every ticket, so the job makes three and a half billion moves, about seven seconds. The lesson shows how an array sits in memory, why any index is one calculation, why a middle insert moves n minus i entries, and why appends cost O(1) on average when the array doubles. It counts moves and copies on real runs and shows when to rebuild in one pass.
You work on the packing screen of an online store.