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 said pickpeaks should not ignore peaks.
Did you change your mind? Cause when I'm trying to submit I get:
" should support finding peaks, despite the plateau
✘ {'pos': [2, 3], 'peaks': [3, 2]} should equal {'pos': [2], 'peaks': [3]} "
is this a bug? The instructions don't mention this and it would at least need another parameter to determine whether ignore peaks is on or off for that special case. Definitely not solvable without a proper set of instructions for this case.
for Python:
should support finding peaks, despite the plateau
✘ {'pos': [2, 3], 'peaks': [3, 2]} should equal {'pos': [2], 'peaks': [3]}
I feel like I'm missing something, but I have no idea what exactly... is the algorithm supposed to ignore all plateaus if a certain parameter is given? If so the description doesn't mention this requirement at all. This test case is very vague and I can't decipher it's meaning or purpose.
Right now I feel like this is impossible to finish without the proper info.
test says:
Response received but no data was written to STDOUT or STDERR.
what does this mean?
my function ends with "return decimal" in case of any doubt it would at LEAST return 0
no, I believe this is as fast as it gets (at least in asymptotic runtime - which is # of candidate times max(length of candidates))
i guess if you really wanted to optimize you could reduce the time counting length of the words by instead of using len() writing your own counter that interrupts as soon as candidate length becomes bigger than word length. now your upper limit is # of candidates times word length
well...
expecting us to create our own prime numbers up till n is quite the heavy assignment when having to guarantee a runtime <12000ms that's when the code will time out...
sadly though the code wasn't even running for 12 seconds before it decided to time out...
was trying a Sieve of Eratosthenes approach on generating the primes but apparently it takes too long so I'm clueless how to proceed.
doesnt that just return a triangle?