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.
If it were to do complete test for multi-char glyphs it would get way out of the scope of a 7kyu, specially once you consider variant selectors, combining diacritical marks, RTL text and regional indicators. Properly reversing a string is not an easy task.
Challenge accepted!
(even-sized diamonds are totally possible)
Thank you
The tests don't check for multi-char glyphs. This means that naive implementations (most, if not all submitted, including mine) would corrupt the strings with multi-char glyphs in them by reversing order of chars in them. Either add test cases for those or add the assumption that input strings are ASCII in instructions.
If there's multiple spaces, your .s method might remove some of them. Spaces should be preserved.
This comment is hidden because it contains spoiler information about the solution
Do we need to reverse graphemes in the words or just the chars are fine?
Grapheme-based reversing would need an external crate to do properly in Rust. Is there a way to plug in dependencies here?