Problem Solving with code – Speeding Fine

We are going to start a series of posts on code problem solving. This will really help you guys that are self taught software developers. No matter how simple or complex we get with these problems it’s always good to take 10 to 20 mins and practice. All of these post will be using Java but feel free to post your solutions using whatever language you like. I would encourage you to take the extra time to write some unit tests so that you know if your code works or not.

Solve the problem on paper or a whiteboard using pseudocode first and post a picture of your solution in the comments below!

Here is an example of some really rough code on paper that I was writing to solve another problem.

The first problem we are going to talk about is speeding fine.

Below is the solution to the speeding fine problem. Post a link to an image of how you solved it or create your own gist for everyone to see.