A couple months ago I received a little recruitment exercise challenge based on Markov Algorithm that I started but never finished, so today with a lot of free time and basically without any thing to do I decided to take it again and finish it, but firstable, I’ll publish the base algorithm first.
So this is my solution code to solve the algorith according of the rules and requirements of the algorithm that I will put in the follow link
Output
If something is wrong with the code or is there are a lot better solution of this, please, feel free to comment