JCPenney Interview Question

The blocks were the most difficult thing for me