IBM interview question

How was the difficulty of this assignment