The Deaf Rats of Hamelin
Story
The Pied Piper has been enlisted to play his magical tune and coax all the rats out of town.
But some of the rats are deaf and are going the wrong way!
Kata Task
How many deaf rats are there?
Legend
P
= The Pied PiperO~
= Rat going left~O
= Rat going right
Example
ex1
~O~O~O~O P
has 0 deaf ratsex2
P O~ O~ ~O O~
has 1 deaf ratex3
~O~O~O~OP~O~OO~
has 2 deaf rats
Series
Solutions
🧠 C++
Last updated