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.
Agree.
That's right
But if we'll look at tests again we'll see only strings (and lists of strings) as arguments... so IMO we should consider this tast as "strings"-exercise. And treat the task widly, like with real life tasks. IMO again.
Thanks for your solution anyway.
the problem statement did not state that the case you described should return true. I think it's a safe assumption that the author only wanted a True to return if there was an exact match in the list, and false if there are only partial matches or no match at all.
Very clever, but...
In case of a string='bye' and a list=['bye bye'] it will return False
Ok, thx! Learned something today!
The kata is more targeted towards a paging as in memory paging mechanism, not to be mixed up with a page in a book. Here is a pointer: https://en.wikipedia.org/wiki/Paging. In computer science nearly every counting sequence starts at 0 (think of array indices for example).
Concerning the test output, I agree.
Maybe numbers are too big for JS and I would have to change them...
Javascript.
And what I've found is that my sum, for large numbers, starts to be different from the correct value (I've checked it with wolfram alpha and also with a quick implementation in python).
Which language?
I've optimized my solution (expanded the summation) but I'm still stuck with the expected value of 55100.
Is there any clever trick that needs to be applied when we reach those huge values for m?
Thanks in advance!
I can't seem to get my code through the fourth submit test for python, although the given output is exactly the same as what is requested. Could you have a look at that?
I improved the solution in other languages:-) Thank for the feedback!
As a comment on my solution I explained how this problem can be solved without going through the entire series from i = 1 to n, just by applying a limited amount of equations. This results in a solution which needs less calculation power (I got around 2300 ms when going through the series, and around 1400 ms with the 'optimized solution'.) As you gave the suggestion to optimize the solution, this problem would just get that extra edge, and increase the difficulty slightly, if such an optimized solution was actually needed in order to fulfill the kata.
I don't understand what you mean. Please can you be more explicit?
C# part doesn't work just yet. Good problem.
Loading more items...