TransDyne Interview Question

Nothing much difficult.