Netcracker Technology interview question

Algorithm and problem solving.