IBM interview question

Case question and coding question