Instructions state that "Words smaller than 3 letters should not change", but it should read smaller than 4, since three letters word are not going to change since the first and last letter cannot be changed.
It's fair to define the problem such that a "scrambled" word is not identical to its unscrambled version, even though simple implementations might generate that outcome. This is covered in the description:
Check that the string returned is not equal to the string passed (you may have to revalidate the solution if your function randomly returns the same string)
kata should make sure not to pass in values like "loop" for input (included as a fixed test in JS) because they are not solvable according to the requirement of the kata (make sure the word is different by changing its inner characters), or there should be some extra-specification, or something else.
I passed about 20 tests during submission, but then it goes into time out.
I call my function multiple times (while loop) until the word is not the same as the one entered in tests.
Can someone help?
I can not understand where is the mistake.
Instructions state that "Words smaller than 3 letters should not change", but it should read smaller than 4, since three letters word are not going to change since the first and last letter cannot be changed.
It's fair to define the problem such that a "scrambled" word is not identical to its unscrambled version, even though simple implementations might generate that outcome. This is covered in the description:
Therefore, not a kata issue.
you shouldn't test for scrambled(word) != word
In fact, for first example test, there is 33% chance that its the same.
You should try to print stuff: https://docs.codewars.com/training/troubleshooting/#print-output
kata should make sure not to pass in values like
"loop"
for input (included as a fixed test in JS) because they are not solvable according to the requirement of the kata (make sure the word is different by changing its inner characters), or there should be some extra-specification, or something else.OP solved it, closing
Not a kata suggestion!
I passed about 20 tests during submission, but then it goes into time out.
I call my function multiple times (while loop) until the word is not the same as the one entered in tests.
Can someone help?
I can not understand where is the mistake.
Thanks in advance.
Cool little kata; author is inactive and Python tests need to be updated to new layout.
Also missing some useful tags, like strings for example, in description.
Needs a javascript tests update (also random tests as written below), it throws warnings
All single letters in spanish are feminine.
not an issue
Ruby 3.0 should be enabled.
Loading more items...