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
I tried to solve this in Rust. It's not that hard, but it pigeonholes you so hard into a bad design that exposes internals and has a bad memory layout, all of which I was trying to avoid. After a lot of trying to work around the bad design, I passed the local tests, but I was unable to pass the real tests due to the repeated use of design implementation internals that should not have been relied on. Even beyond that, pretty much everything you're being told is a requirement is non-idiomatic Rust:
to_vec
instead of implementing theFrom
/Into
trait, custommap
andfilter
instead of implementing theIntoIter
andIterable
traits, customfrom_iter
instead of implementing theFromIterator
trait.If all of that ever gets fixed, I'd love to try this again. Peace ✌🏻
This comment is hidden because it contains spoiler information about the solution
Agreed! Like most code where you try to make it short beyond reasonable, but that was the challenge here.
well, lets obfuscate it more
I can't wait for the
std::iter::Iterator#array_chunks<const N: usize>
feature to be stable! Then you won't even needitertools
to do this.😭 why would you poorly obfuscate a function that reverses strings
This is an abomination...
I think that's only a concern if you are writing code for a real-time application and are at the same time very resource-restrained. Otherwise, this shouldn't matter when running code on modern computers.
This isn't even good. You're recreating a huge array every time this is called. And the other option isn't very good either because you'd have a giant array just taking up memory.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...