Tesco Interview Question

Basic oops and data structures