But this has nothing to do with "it is GUARANTEED that the signature contains 3 values". It's distressing and unfair that the solver, counting on this guarantee, is assaulted with INCORRECT results because some of thie inputs DO NOT HAVE 3 values.
I like this Kata, however, there is one point that was rather confusing. It is stated that the function/method has to return an array "of the first n elements - signature included" of the parameter array s. Plus, it is guaranteed that the signature always contains 3 values. So how come that there are tests that expect arrays of length less than 3 (e.g. 1) as a return? It would be nice, if some one could clarify that for me.
"Distressing" or even "assaulted", plenty of uppercase, not admitting you might be wrong...
I would take a wild guess and assume you might not be too far from a uni, possibly an anglosaxon one.
Not sure about your language, but the initial signature is always 3 elements, so, unless you modify it, think again at what might happen.
But this has nothing to do with "it is GUARANTEED that the signature contains 3 values". It's distressing and unfair that the solver, counting on this guarantee, is assaulted with INCORRECT results because some of thie inputs DO NOT HAVE 3 values.
I was confused by the same thing. It could be more clear that the "n" is for the first "n" number(s) of the sequence - in an array.
I had the same issue. Removing all System.out.println lines solved it for me. Thank you!
I like this Kata, however, there is one point that was rather confusing. It is stated that the function/method has to return an array "of the first n elements - signature included" of the parameter array s. Plus, it is guaranteed that the signature always contains 3 values. So how come that there are tests that expect arrays of length less than 3 (e.g. 1) as a return? It would be nice, if some one could clarify that for me.