Ad
  • Custom User Avatar

    I agree, that string is valid, and the first non-repeating letter (meeting the challenge reqs) is p, which means it's valid.

    However, that string also has several control characters (invisible in print), which are also duplicated. Those hidden characters could be confusing.

  • Custom User Avatar

    There is only one 'p' in this string?!

  • Custom User Avatar
  • Custom User Avatar

    I understand. In truth what I'd hoped to achieve was to emulate something I do often in my day-to-day job - take existing code (hence the initial solution) which works, but isn't fast enough, and find ways to improve it - which, in my opinion, is somewhere between optimization and bug fixing. In my case I've been getting a lot of mileage out of parallel processing lately, and I'd hoped to see how others might approach the same problem.

    Including the import statement was a mistake, I meant to remove it when stripping out the 'optimized' code - whoops.

    I've removed all of the code other than the signature from the initial code; I've left the hashing function in the preloaded code should anyone wish to use it. It isn't exactly how I'd initially envisioned it, but if it proves to be a better kata for it, then so be it.

    Update: Actually, looking at it now... it's basically the same Kata as the original now. I can't remove it, but I won't publish it either.

  • Custom User Avatar

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

  • Custom User Avatar

    I'm not sure that I agree that this kata spoils anything from the original kata; I took care to avoid exposing the source code of anything that could solve the original Kata in the preloaded code which is not visible to testees; and in addition to that I recommended that anyone seeking to try this kata should try the original first.

    That said - do you have any suggestions ? I'm open to ideas.

  • Custom User Avatar

    Spoilering answers of other existing katas is an NG action on CW

  • Custom User Avatar

    C#: The random tests here seem to be incorrect; they generate strings with one or more non-repeating characters, and then fail because they expect there to be no non-repeating characters, e.g

    String generated for test: ˆ†xLm…eHLph|aRsyYlS}c…}bETNnJv\max

    Expected output of test: String.Empty

    Actual result: p