Philips Interview Question

Data structure and problem solving.