Mphasis interview question

all was straight forward....