IBM interview question

String operation and sum reverse method in HackerRank