WEX Interview Question

Write code to sort packages based on their dimensions and weight