Kroger Interview Question

No difficulty here.