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.
About the issue raised by @Voile (this Kata being way too similar to the previous one [sorry]) I had an idea [to make it more "complex"]:
==> What if instead of only handling "Polynomial extrapolation", I required the algorithm to handle Geometric sequences "of all kinds*" too? (* By that, I mean bascally sequences given by a function "whose
logarithm
is a polynomial") ==> AND I would require the algorithm to be "smart", i.e. "detect if the sequence is polynomial or geometric" (the given sequences will always be either "polynomial" or "geometric (in a generalized way)", with enough terms such that the algorithm can "identify the pattern" (e.g. if it's a polynomial of degree 3, the sequence will have at least 5 (or 6?) terms, so that the pattern is "not too ambiguous")In other words, the algorithm should be able to treat differently sequences like [1,2,4,8,16,32,...] than sequences like [1,2,3,4,5,6,...])
==> would it be "better"? 🙂
The letter detection could be upgraded a bit. I'll do a fork with a proposal.
This kata is exactly the same as the non-restricted kata. The source code restriction is pointless since you just need to take any solution from that kata, replace all identifiers with names like
_0_
, and fill in all the used built-ins.Can we please have letters in comments?
That might make solutions at least somewhat readable, by enabling us to provide a translation table of sorts.
R translation now available :)
If anyone finds any issue, please do not hesitate to report ;)
I think it'd be nice if this was actually enforced, as some of the submitted solutions have a
dual_seq
implementation with time complexity worse thanO(n^2)
.If possible, please make the description clear, complete and concise. Most of the parts are lacking clarity (which is quite understandable, but I feel you can improve it by a lot), sense of completeness and parts are not fitting together. Don't get me wrong, I'm not asking to spell out everything (if there is something like that).
(I went on implementing the high school formula of polynomial interpolation, and still puzzled on why you've asked to return the function arguments along with the output.)