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.
Yes, that was not clearly specifified and could only be derived from the example. To make sense as an outlier-rejection algorithm the order of evaluation must not matter. We therefore only consider the original data as a whole.
Specs are still incomplete. How does cutting an outlier influence earlier values? ( They may now be outliers. ) Is cutting outliers strictly left-to-right, iterative, right-to-left, or does it only happen in original windows?
How can the example still have the outlier
3
in it?Oops, there was an off-by-one error that is fixed now. So the
3
is cut now correctly.Thanks for raising this issue!
I have the exact same question. My code passes all other tests execpt this one.
I have a question about this example.
With a lawnmower of length 5, it will consider the range [0,1,3,0,1]. In this range, the median is 1. However, 3 is more than 2 times the median in this range. So why is 3 not cut?
Thank you for the feedback on the beta of this Kata! The initical code was indeed necessary as part of the specification, so I changed the description now that it can stand alone.
Description is incomplete. Examples are not specifications; the description should be complete without them. Even the values that the example introduces ( threshold, window ) are, again, unspecified. They might be function arguments, but, again, the description does not specify that. Initial code is not specs either!
The explanation for this one was give 5 yrs ago in my reply to @Zed. See the discourse below. Basically you are only cut pasting from the original text - not from the resulting text so that is why there is "BBBB!BBBB!" instead of just "BBBB!", because one of those "BBBB!" was something you just pasted before.
The kata rule "Pasting occurs strictly left-to-right only appending to your current text" is meant to help with understanding this. If you have some better description idea please suggest it.
I find the description still confusing. If I naively think of paste errors why can the output still contain "BBBB!BBBB!"?
there's some description conflict fix it (in histogram diagram)
spoiler flag ;)
yes, that was rather a general note. Considering the size of the problem, there are very little chances that you see any difference. For instance, my solution is slow because of the
z..
thing (among other stuff).(I posted some forks to my solution of you wanna see other possible approaches)
cheers
This comment is hidden because it contains spoiler information about the solution
note: you should avoid string concatenation
Approved. Thanks.
Loading more items...