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
Good Kata, there's always a danger that someone will get totally lost in the weeds on these types since the directions have to be cryptic or it spoils it. I, for example, was exploring the file structure with node's FileSystem class for a while. didn't seem to be anything useful for the Kata that was accessible, but it might be cool if you can leave a little easter egg in there. Not sure how that works though.
Not too tough to solve, but overall still fun.
I'd argue against the best practices upvote on this one. Having your exploit named "exploit" is definitely not a best practice ;)
This comment is hidden because it contains spoiler information about the solution
Awesome, ya, I was suggesting the formal series option (though I didn't really know it yesterday). I've stumbled upon a couple other series and they make for a good experience. Since your's go together so well and build on eachother I think it works well as a series.
Glad you made it into a series, hope others find them and enjoy them.
Trivial having already done boolfuck since I was able to reusee my class for that, but still fun!
I'd recommend ordering all your *fuck Katas into a series with links to the others on each Kata since they are so related, build on eachother, and increase in complexity.
I'm not sure what was more difficult, making test cases with boolfuck or writing the interpreter. Definitely a fun one, and not something I get to do every day (bit level manipulation). Great Kata!
This implementation will consume O(n^2) memory while not beeting O(n) time. An O(n) time and memory algorith can be achieved here.
Each recursive call copies N-1 elements from the list to the next call, while not freeing any memory until the N recursve calls. If you were to pass the List by reference, you'd be better off, but because you don't have control of the passed in function (which doens't pass by reference) you'll still be consuming O(n^2) memory.
Without Big-O, all this just means your recursive implementation will eat memory and for larger lists you'll run out of memory, even if the entire list can fit in memory just fine.