Philips Interview Question

Describe the code for this feature