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.
Your code is not a correct solution for this problem. Your type declaration is not a valid TypeScript type (it is not allowed to write
M + 1
for generic parameters). It passes Sample Tests because the TypeScript Codewars setup is very lenient and it allows incorrect types by replacing them withAny
. Real tests are much stricter and that's why your solution fails them.I improved Sample Tests (now your solution does not pass them).