Ad
  • Custom User Avatar

    This is a 7 kyu problem, so the author likely assumes the challenger's conception of a string is not quite so complicated.

  • Custom User Avatar

    IMO, the problem is in the question. The question does not define "length" precisely.
    We have several kind of lengths in a Unicode string such as Code Unit count, Scalar Value count, Grapheme Cluster count, byte count.
    This answer is perfectly fine if the question was intended for byte count or Code Unit count.