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.
You can use jsbench.me
That is the first value to start with for the aggregation because Aggregate will otherwise throw an InvalidOperationException if the array is empty. Just extend your tests with an empty array to see the difference :)
I really like this. Does anyone know why the number 1 is there? I tested the code without it and it works.
Don't know much about that, but a pretty basic way to measure times is getting the time before execution then subtract that time to the time after execution, that could give you time execution, "could" because it's not consistent for several reasons, like, it depends on the specs of your device, programs you're running, etcetera, so this is just like an archaic way. Actual pros analyze the time and space complexity of the algorithm as a whole, considering the size of the inputs, cost of each function call, loops, and more stuff, which I don't have any knowledge on those topics.
How do you make measurements like that? I am a noob but try to think about the efficiency of my code and wonder about ways I could check.
I carried out measurements, on lines more than 10,000 characters long, this solution ceases to be effective. It seems that on long strings, converting to sets is more expensive than actually checking for matches in the original strings.
Is there absolutely no way to change them? (I'm new to codewars)
It makes no sense at the moment. We have to manually add imprecision to our answer.
Thanks for the info lechevalier -- I was really wondering what the problem was.
It's not O(n). The Except method has to compare the
wordCount
elements one by one for eachwCount
.Ok.
This comment is hidden because it contains spoiler information about the solution
I checked the python code and didn't see any input that could cause troubles to the most basic implementation, without any additional information. In what language did you encounter that problem?
or one solves the issue BEFORE resolving it, and only then the kata gets approved...?
close the issue so this kata can be approved..
-ve numbers are not present , zero is also excluded. Therefore no need to check for those.
It's a bug depending on which OS you run (more exactly how C
strftime
is implemented): https://bugs.python.org/issue13305.Looking at Python docs, all options should be padded.
Loading more items...