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.
hey, I tried to compile this in c and the tests worked until the random ones where it got a error code 6. i was allocating the array with calloc and the stderr said something with
free(): invalid next size (fast)
, you sure you free it in the right way? because from what i read err 6 can mean a heap overflowVery fun kata, a little to easy for 6kyu.
Idk why people had a problem to understand the task. I didn't know what is a deadfish either but by looking at a description of kata and examples I didn't had to.
sorry but the explanation of this Kata is not very good, I had to google it to actually understand it.
You are checking whether the string contains specified characters. Instead, you should check whether the current character that you are iterating thru the string matches either one of (
i
/d
/s
/o
) or other invalid charactersShould be 7 kyu;
Scala: assertion messages are unhelpful:
I fear tests can be suject to overflow like other languages.
This comment is hidden because it contains spoiler information about the solution
CS: no basic tests and only 7 random tests.
very easy,that should be 7 kyu
What's Deadfish?
I guess that this could be 7kyu atleast.
I don't get it why my solution do not pass random test...
This kata is too easy for 6 kyu
There is no need to post solutions in the discourse. If you want to show @f1e how their solution can be refactored, you could fork their solution, or comment on it.
This comment is hidden because it contains spoiler information about the solution
Good question. People will say blanket things like "for loops are always faster", but it -really- depends on every individual use case. So you might want to create solutions for each to the best of your ability, then benchmark them.
Here are a couple of the top solutions (one for switch statement, and one for for loops) benchmarked against each other: https://jsbench.me/e3lh84u45z/1
It seems like the switch statement solution is 11% faster, but you'll notice the for loop example has some regex bloat in there which is probably slowing it down.
Create your own clean solutions and benchmark them yourself. It's kinda fun.
Loading more items...