Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
spoiler flag...
This comment is hidden because it contains spoiler information about the solution
Just thinking that "loop the same long string 26 times" already is O(n).
This is actually an issue because I didn't know what the hell fizzbuzz is
You simply didint provide any directions on thi assuming that 'its one of the first programming puzzles people learn'
Lame description.
Start from the first kata in series if this one is too hard for you
pinging you to note that there's a new php issue. your regex is no good. woahh a regex bug? that never happens.
Hello. Unless I am missing something obvious, there seems to be an issue with random tests in PHP.
I keep failing with messages like:
Fight:
dpabzgm**dy*s
Expected result:
Let's fight again!
OR
Fight:
*ddq*bpxzb**m
Expected result:
Right side wins!
OR
Fight:
up**sz
Expected result:
Let's fight again!
None of the above expectations is correct! (according to how I understood the kata details)
Here is my analysis of the above examples:
fight
string:fight
string after airstrike:Left
side letters:Right
side letters:Left
power:Right
power:dpabzgm**dy*s
Let's fight again!
dpabzg_______
'p','b'
'd','z'
Left side wins!
*ddq*bpxzb**m
Right side wins!
__d___pxz____
'p'
'd','z'
Let's fight again!
up**sz
Let's fight again!
u____z
-
z
Right side wins!
Can someone please check the random tests setup or point out my mistake? Thank you very much in advance.
The description is not good. it does not make explicit how to calculate who wins, you have to only assume that.
A problem with your code is not a kata suggestion, it's a question. Please read this: https://docs.codewars.com/training/troubleshooting/#expected-the-same
Also:
Your code always returns
None
.BF:
'\u0000'
(charcode 0) isn't the same as the character'0'
(charcode 48). Can you find a way to map charcodes 0 - 9 to the actual characters'0'
-'9'
?(Not a kata issue by the way)
No, the example is fine. the 3 in 13 is to be considered a 7 and it becomes a 17, that's why ordered ascending the expected result is
[12, 14, 13]
. 3 means 7 in that other planet, but you shouldn't translate to your own language, so, no, the answer is not[12, 17, 14]
. Nothing to fix, not a kata issue.poor description and confusing examples.
this is not right: [12,13,14] -> [12,14,13]
it should be: [12, 17, 14] if 3 in 13 is to be considred
or no change to be made: [12,13,14] since there is no 3 or 7
Please be fix it either your requirements or your example and tests
not a kata issue, works fine in ruby, and you have passed the kata anyway
Im getting this error.
`createPhoneNumber': wrong number of arguments (given 0, expected 1) (ArgumentError)
Loading more items...