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.
Like you're solution
Solution posted 6 years ago)
There is no add method being tested in ruby. I'm not sure what you're talking about.
WTF Ruby tests are testing an add method?
solution from chatgpt C:
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
.Loading more items...