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.
Trying a solution in R, and it seems to work for non-empty results, but I'm failing to satisfy the tests for the arrays with no anagrams. The error for the fixed test complains that:
anagrams("big", c("gig", "dib", "bid", "biig")) not equal to character(0).
target is NULL, current is character
I tried returning both an empty character vector and a NULL (which behave as expected on my computer), and both solutions result in this error. What am I missing? What does the no-anagram tests expect to see if not an empty vector or a NULL?
The description wording is really misleading for languages that index starting from 1.
This is obvious from the first iteration:
On Day 1, John does 0 and Ann does 1, as starting points given in the description (specifically as such for 1-index languages, which is where the issue stems from)
On Day 2, John is supposed to do day-ann(john(day-1)). John, on day-1 (so Day 1) does 0 katas, but Day 0 doesn't exist so we can't know how many katas Ann did that day.
There is a workaround once you start thinking in terms of 0-index languages (not giving out spoilers, see my solution for how I worked around it), but no wonder people have been complaining about this. It's not just an 'unclear' description, parts of the description are bordering on flat out wrong for a whole family of languages.