For example: what if there is 3.25 in tests? My solution is the same, but I think it is pretty cheating and should not be allowed. Hovewer top solutions for this kata does not work now also.
Your code like mine, i don't find something smarter than just compare with 4.25. If you know best solution tell me why you solve it.
We almost had the exact same solution but you simplified away one 5, nice!
There're no tests which reuse the returned function, so get_permutation should receive both the pattern and the non-permuted list, and return a permuted list.
Done, thanks for pointing this out!
You're absolutely right, thanks for spotting this. I think I've fixed the issue.
Clever how you beat the static tests as well as the random ones!
plz, update your test suite so that it uses the new test framework (mostly: it's missing describe and it blocks):
This shouldn't work.
What do you mean?
The user can modify the input.
I had the same issue and it was because my index had exceeded the bounds of the string str, so blank characters were being added to my result. Maybe have another look at your loop conditions? Try printing the string one char at a time to see where the blanks are being added
This is really helpful to know, and something I hadn't thought about. Thanks
My mistake! Sorry about that. Thanks for letting me know
Katas about ciphers should never be tested with decrypt(encrypt(input)).
This is Vigenere cipher, and it's a duplicate: