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.
Needs sample test cases for Python.
The default argument
len
should belength
orl
to avoid overwritinglen()
.I'll start working on some. Not sure I'll have them done any time soon.
Looks much simpler, but using
eval()
is a bit of a tradeoff.Error in first Python Example Test. Input is stored in
array
, but should be calledarr
.Python instructions are missing an example of required output.
Typo at end of description: "Retrun"
I didn't check how it was calculated before, but 1626 / 4 = 406.5. It looks right now.
Random test cases occassionally testing for February 29th in non-leap years (e.g. '16260229').
Random test cases are expecting incorrect responses.
For example:
Input: 19940106
Error: 'Thursday' should equal 'Wednesday'
1994-01-06 was a Thursday.
Thanks for all the feedback. It looks like most solutions here have this same process or use collections.Counter.
Is Counter much more efficient? For each item in
collection
, it has to check in the dict to see if it exists, then increment it. Is that also O(n^2)?Thanks. I like that it doesn't require importing. I think superrafek's response is a bit more understandable than mine.
Starting code had method name
covex_method
but sample and final tests requirehull_method
. Starting function should behull_method
.Looks good!
Is it hard to just remove the 0s? The function doesn't take 0 as an input anyway.
Loading more items...