PwC Interview Question

program based on Collection.