DPS Telecom interview question

2 steps of Coding challenge.