Optimizing Box Weights Hackerrank Practice Test