IBM interview question

GD was a bit tough