Oh my bad you're right @Gelatomancer. The example is incorrect (my eyes slipped over the second 20...). I'll publish a new fork with the amended description. I apologize.
Please explain. With the given list [20,37,20,21] we have 20 in there twice. This goes over the given number 1, so the 2nd 20 is removed and the result should be [20,37,21], just like the kata expects. Perfect!
You can submit other solutions if you want.
I also misunderstood what you meant, sorry!
Oh my bad you're right @Gelatomancer. The example is incorrect (my eyes slipped over the second 20...). I'll publish a new fork with the amended description. I apologize.
Please explain. With the given list
[20,37,20,21]
we have20
in there twice. This goes over the given number1
, so the 2nd20
is removed and the result should be[20,37,21]
, just like the kata expects. Perfect!This is perfectly correct.