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.
It is not mentioned anywhere that inputs like
[0] * n, n > 1
and[n] + [0] * m, n != 0, m > 1
should be interepreted as geometric sequences.For invalid sequences either the output should be changed to
None
, or the function should throw an error. Returning a magic value which never occurs as "normal" function output because your input range is artificially limited is plain bad design.In some cases, which do not correspond to either AP or GP, first element of sequence is expected instead of -1
I suggest to add more fixed and random test sequences containing zero(s) and negatives, e.g.:
etc.
bigger/smaller(a, b, c) or bigger/smaller(b, c) ?
Trivial arithmetic/conditions is neither novel nor interesting kata idea.