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.
Is your algorithm covering the classes of 2181 to 2189? The next musical will be in 2195 and the classes that enrol in 2187, 2188 and 2199 will get to see that musical, leaving the classes of 2181 - 2186, the other six classes
Can you help me with this example?.
I'm looking this random test with an answer of 56:
start = 2075
end = 2189
musical_every = 15
enrollment_duration = 8
The years of musicals are below.
[2075, 2090, 2105, 2120, 2135, 2150, 2165, 2180]
Between each interval, 7 students won't see the musical and there are 7 intervals, so.
7 * 7 = 49 students in total will miss the musical. The person who enroll in 2181 won't see
the final musical in the end class. So 49 + 1 = 50. Where are the other six persons.
Not necessarily. There will always be a musical for the start class only unless the school does no musicals. For the end class, it will depend on the duration for a musical to take place and also the duration of enrolment in school.
So in the end class there will be also a musical no matter what?
I wasn't really expecting that one to be added, but maybe a somewhat more strenuous test is needed to weed out attempts (like my first) that are actually plain wrong.
EDIT: Also, I just looked, the 2kyu version doesn't include Javascript, which is a shame. Not there yet with Python.
hi, that won'tbe added here, since this version isn't supposed to handle such a kind of grid. But you can try your solution on the 2kyu version.
I re-submitted a solution, since although my original passed the tests, it would have definitely failed on some puzzles. E.g. the (supposed) hardest ever puzzle (below).
It's probably too late but maybe harder tests might filter out false solutions like my original submission.
And ... it works.
Not sure what to take from this, except 'turn it off and on again' :)
Thanks a lot for sticking with this.
Ps. I will look at some of the amazingly concise solutions for some of the tools you mentioned.
ooookayyy....... :/
Weirdest thing: I tried your solution against the actual test suite and it works like a charm...
=> ?
I updated it with a much smaller example (and put the back-ticks in).
put backticks around the input otherwise the "coment engine" will chop some of them, thinking it's formatting.
I was trying to fulfill the bonus bits ...
-Avoid creating an array whose memory footprint is roughly as big as the input text.
-Avoid sorting the entire array of unique words.
Hers's an example of input that fails:
'BxhhnNv':,?'BxhhnNv'._.?.'BxhhnNv'.'BxhhnNv'??'BxhhnNv',,,!;'BxhhnNv'-'BxhhnNv'-;'BxhhnNv'_-'BxhhnNv'..!,!'BxhhnNv'._: -'BxhhnNv'-;'BxhhnNv';'BxhhnNv'_'BxhhnNv':..,.'BxhhnNv'_,??
The fail message is:
Incorrect match: words not present in the string. Your output: ['bxhhnnv']. One possible valid answer: ["'bxhhnnv'"]
As I say though, locally I get the valid answer.
(lots of "antipatterns", in there... Mostly because you don't know yet some tools that python provides) ;o
Well, I'm surprised to realize I actually didn't ask for something...: what was the input, for what you described in the first message?
Thanks for that, I ended up using a html pre tag - it's readable now.
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting
Loading more items...