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.
Fixed (you need to reset the trainer to see the fix).
How do you know if you're using functional approach? is it when you use advanced methods like composition, currying and partial application? Because from what I know, applying the principles are enough to be considered as functional (Immutability, Higher-order & first-class function, referential transparancy, etc).
If the advanced methods are not required, then you don't have to use it.
Yeah, It's kinda sad that people don't cheat not because it's not allowed, but because they can't.
I tried your solution and got that:
I also tried several recent solutions and they all worked fine so the problem is in your code: you are sorting a null list... AFAIK Null Safety is from 2.12 and the version used by CW is 2.8 so there is no problem in the kata with Null Safety.
I don't think that's what happens. Your solution should pass this test case correctly. But it fails for following test cases:
Basically, you turned the problem into two problems ;)
BTW I'm not sure if I got you right, but if you are trying to use regex and you try to use input argument as a (part of) regex pattern, then there's one particular aspect you need to handle, or otherwise you will get errors related to syntax of the expression.
could you post your code here? the one you think is correct but Codewars says its not?