Code

Here is the solution for the coding challenge