Yesterday we helper Santa Claus decrypting a secret message and today we help the head mechanic elf to check today's train wagons.
In particular, it should be checked whether the brakes of the wagons have been serviced in the last year.
This puzzle is based on linked lists. The train is a linked list where each node is represented by a wagon and the head of the linked list is the locomotive.
Here is my code with the output.
This will be the last challenge of this series for me.
My holidays are over and I'm back at work.