Trimax interview question

technical part was difficult