Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    Return null/nil/None/... if the input is an even number or negative, as it is not possible to print a diamond of even or negative size.

    Challenge accepted!
    (even-sized diamonds are totally possible)

  • Default User Avatar

    Thank you

  • Custom User Avatar

    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.

  • Custom User Avatar

    If there's multiple spaces, your .s method might remove some of them. Spaces should be preserved.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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?