Re-raised as an issue.
No random tests.
This comment is hidden because it contains spoiler information about the solution
Because the kata was changed after this was made. See the comments below.
I failed this solution because of overflow!
Swift version kumited. Please review and approve if acceptable.
Swift translation kumited. Please review and approve if acceptable.
you don't know python enough, then:
I agree with Chrono. This was an issue in JS version because accessing the last element of an empty array results in a falsey value (and people were abusing this fact, leading to wrong program logic). This is not possible in Python though, so I don't see why such tests are needed here.
mmmh, I see the same issue resolved below, tho I don't see the related tests in the test cases... :o => ??
python: need a test with [..., ..., ''] or (preferably and) [..., ..., 0]
[..., ..., '']
[..., ..., 0]
@Barri now you have it.