Siemens Interview Question

it was very hard to handle