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 has different performance characteristics. This solution means that you allocate a whole new array just so you can find its length.
In Haskell, it's not a problem because list nodes are only created as needed. There is also short cut optimization to make sure that a solution like this will be efficient.
I wish that the input gets simplified, so we get into the core of the problem, which is SAT, instead of also doing parsing too.
Unlike others, I feel iffy about this one. This looks like someone adopted Haskell's solution on an imperative programming language, despite Javascript uses arrays and not list.
The Haskell one has a pretty sus test case. Why is there
Num
instance forString
? Just write the quotes already.This comment is hidden because it contains spoiler information about the solution
This is a math kata, not a programming kata