Ad
  • Default User Avatar

    Redundent testing of lower bound.

  • Default User Avatar

    Agreed, while cleaver the longer term readability of this method seems to be less than ideal.

  • Default User Avatar

    I agree with him, the description is failing entirely from a complete understanding. The vague nature of your description is a failing of the Kata, if one has to come here to understand the description of what is being asked it is clearly an issue. This has been an issue for going on 6 years... perhaps another fresh set of eyes is needed to understand why it is confusing. Especially for only a 7kyu.

  • Default User Avatar

    Yeah I am use to using buffer for strings coming from Java so searched docs for it from the get go, and after seeing the solutions look at the cheap oneliner in code to see what it was doing if anything and nope, just uses the string builder instead of bytes but affectivly the same iterative loop on a count. The only heads up thing was that it preemptively grew the size ahead of time so that if you were looping a large number of times it would not have to resize. https://github.com/golang/go/blob/master/src/strings/strings.go#L533-L536