IBM interview question

MF question