DC Energy Interview Question

Sorting boxes algorithm and case study