Tesco Bengaluru Interview Question

Design problem