This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!
Submit FeedbackA solution to last week’s challenge can be found here.
On daily basis, call centers are handling customers requests using a chat feature. In parallel, their analysts are checking data to report on their operators performance.
A data analyst in a major call center was responsible to report on their numbers by the end of the day. He wants to convert the time format from "HH:MM:SS" to "Hours Minutes Seconds", and his boss does not want any unnecessary information in the output. So meaning, no leading zeros and attribute should be removed if it is zero.
Using the data sets provided create an output with the format that the data analyst needs.
Right on time!
Even though this was a simple one, I still adhered to the principle of dumping or filtering out unneeded data as soon as possible.
There are a pile of ways of doing this. I think I can see what Qiu was looking for based on the format of the solution and his including a mapping table for the time units, so I tried to follow that.
Feel like I was lazy and have too many tools, but I am pressed for time so just threw this together.