Metaswitch Interview Question

Solving the questions