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.
I don't know
Sorry, I didn't know that the discussion is lanugage agnostic.
I see. I apologize.
Please specify the language when raising issues. I'm assuming you're referring to the C translation.
No, the size of the allocated buffer is irrelevant as long as it's big enough. What's important is to set the value of
nb_vowels
appropriately (refer to the solution setup).Not a kata issue. Next time, please raise a
Question
when you're unsure.This comment is hidden because it contains spoiler information about the solution
Are you on macOS? I suspect that this is a distribution problem. I think macOS has a differentecho
then GNU/Linux.echo
is a built-in command, so it's the fault of the built-in bash being too old. This should work with newer bash.Thank you for this solution! Btw, do you mind sharing what code formatter you use? This vertical alignment looks really neat.
Approved by someone
Approved, thank you all for the effort!
I reduced the input size to max 300 elements.
They were removed because the kata was decided to not be a performance kata. It would be quite inconsistent if some languages allowed slow solutions while others enforced performance. I really don't know if Rust can trivially handle 10_000 element arrays even with very slow solutions, but the intent is that performance shouldn't be on solvers minds at all (or at least, it shouldnt need to be).
In my original Python translation, hard tests could go up to 10_000 elements, but Kacarott removed those tests in his fork. Rust is much faster than Python, I tried to make roughly equivalent tests in both languages, though I have no real idea about what a naive solution would give.
I see, sorry for the misunderstanding :p
Though isn't that too big too? Or is that to ensure that there's enough cases to distinguish a good solution from a bad one? You only used up to 300 as list length in python.
This comment is hidden because it contains spoiler information about the solution
0..100_000 is the length of the array, not the values inside it. The values are random signed 32 bits integers (
rng.gen::<i32>()
).Hello! Thank you for the translation!
Just one tiny thing, could you change the range
(0,100_000)
to(-100_000, 100_000)
? This would be more coherent to the Python translation, which is the first imperitive translation.Loading more items...