Kroger Interview Question

Solve some queries