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.
This comment is hidden because it contains spoiler information about the solution
While this probably works for the majority of cases, it does have a bug. The problem specifically asks for the first longest occurrence. This algorithm will find the longest occurrence according to string ordering in Elixir, which happens to be alphabetical.
The best solution would probably be to permanently associate a solution with a language version but I guess they didn't go woth that.
Right, the comment was meant for someone who might be confused as to where the function went :)
I can't speak for others, but if I recall correctly I submitted this solution around 2016 or 2017 when codewars was using an ancient version of elixir (something like 1.2). Obviously you would not use String.strip with 1.9 because it doesn't exist.
String.strip was deprecated in favor of String.trim, String.trim_leading, String.trim_trailing
This comment is hidden because it contains spoiler information about the solution
Didn't know about chunk when writing my version, great work and thanks for the enlightenment!
Works, thanks! :-)
Hopefully it is fixed now. Please could you give it a try and tell me if everything is fine.
This definitely needs to be fixed.
I think the randomized Elixir tests are not asserting correctly, in the following scenario: