Philips Interview Question

Some coding concepts