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.
Question from a noob – would this (at scale, for instance) use more memory by creating two separate iterators, or would the compiler optimise this somehow?
Yeah, i see your point. But could one not argue that if
u32 as char
could panic depending on the u32 value, why is it any different than knowing the risk of a i32 panicking in the case of a -ve value for example?Had no idea you could chain casts like that – very nice! (though it seems redundant to not allow
i32 as char
?)As a complete newcomer to Rust, thank you for the comments! If only more people did this on Fundamentals kata instead of code golf!
Love it. Just picking up C++ but very satisfying to see (what I feel is) some exemplary code on an 8kyu!!
Wow, I spent so long on this kata I got logged out and submitted it as a guest by accident.
Of course that exists... damn it python
Thanks for the heads up, adjusted the test cases and that shouldn't work now!