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 just wanted to solve it with O(len(str(start)) + len(str(end))) time complexity, since there is a more advanced version of the same kata where a standard for-loop that checks each integer from start to end won't fit into the time limit. Hence the code complexity and size. It does feel like creating a masterpiece though: it was a very meticulous work, which took me one full evening. But I love the result.
I was just watching, but I was shocked when I saw it, it's just something!
You're likely looking for the
OrderBy
method instead.If you Google "linq order enumerable" you'll find this kind of information easily :)
C# experts is it that normal i have this message with System.Linq, System.Collections and System.Collections.Generic directives included in my solution ?
error CS1061: 'IEnumerable' does not contain a definition for 'Order' and no accessible extension method 'Order' accepting a first argument of type 'IEnumerable' could be found (are you missing a using dire
Maybe add tag "combinatorics"?
Took me more time than I thought it would, but enjoyed it. Kudos to the author.
ditto. I also targeted a wrong format. Besides, I think this kata should be moved to the 7 kyu category at least.
Noticed that case as OK in description!
It'll rerun the tests and only invalidate solutions that fail.
Thank you!
If I modify tests, will it invalidate only those which does not accepted by new tests?
Or it will just invalidate all previous solutions?
I use comma-ok idiom in this translation. There is no need to return a value and error (comma-error idiom).
However, output format should be specified as
value, ok
in the description and/or solution sampleI did some reading, and Go seems .. special.
There is no idiomatic empty value, strings cannot be
nil
, and functions often return "a value and an error." The current initial code seems to return a value and avalid
flag instead.Please do not expose non-Go programmers to this madness. Use language-specific blocks in the description. Also, specify the output format of the function correctly and completely for your 7 kyu solvers.
"Extra modifier tests" in all currently available languages call "xxxs" "4-extra small" ( and large ). That should be "3-extra small" ( and large ).
( Go )
Pick one and stick with it. I don't know if Go has an idiomatic empty value, but neither
0
norfalse
actually looks like it.Why couldn't a negative size be valid? That would be a completely artificial restriction on the number of allowed
x
s befores
.Loading more items...