IBM interview question

Everything was straight forward