Trimax interview question

not really difficult ques. was asked 2 me.