Ad
  • Custom User Avatar

    I propose to retire this kata.

  • Default User Avatar

    Coding is all about problem solving which this is ;).

  • Custom User Avatar

    I don't know why you've been downvoted. You're right.

  • Custom User Avatar

    Imgur seems reliable. Just avoid Tinypic and Photobucket.

  • Custom User Avatar

    Hi! ( Been away for a couple of days. )

    Retirement is permanent. But you can make another kata! This one's biggest problem was it lacked originality though, so reposting this same one is probably not going to give better results. Still, learn from the comments on this one. The big things these days are random tests and an idea that hasn't been done to death. The latter is difficult; there's 8000+ kata already, so a lot of things have been done ( some of them, to death ). The former is rather less difficult, but it's not optional or "can do later".

    Random testing is not just for preventing hardcoded solutions; it's also great for finding edge cases. Your own solution may have more edge cases than you thought, and solvers' may have edge cases you never even considered. For that reason, keep your random generators very general and really random; for testing specific cases that may be edgey, have fixed tests. If random testing finds any edge cases while creating your kata, add fixed tests for it ( people will sometimes tweak their random generator to generate specific tests. that's not what random testing is for [ and it isn't random :] ). If I solve a kata and random testing ( possibly only sometimes ) finds a bug in my solution; I will often comment so the test can be added as a fixed one. ( But most people won't. )

    A fork is exactly what you describe; it can be used to iterate on your own or somebody else's solution. ( It's also a way to look at Preloaded code in a kata. :) It's not really an edit, and it's not even necessarily a solution because you can also edit the tests ( I've used it to propose better tests without changing the actual solution, and I've used it to showcase a different solution with [ performance-wise ] lighter testing ).

  • Custom User Avatar

    I think the random tests should be done again, but for now, they should work.

    Redone.

    Found several edge cases by way of random testing; these have been added as more fixed tests.

  • Custom User Avatar

    As mentioned above, I've done describe and it headers to unmuddy the waters.

  • Custom User Avatar

    Also, there's 128 solvers, so it's likely a code issue. And still, it's bad practice to mutate the input -- even if it doesn't matter.

  • Custom User Avatar

    The input was mutable, yes, and it was probably what he was doing. Now it doesn't matter if he does. That's why I wrote, try again.
    I think the random tests should be done again, but for now, they should work.

  • Custom User Avatar

    Is the issue solved?

    How this can be is immaterial ( unless the issue has actually not been solved ). Yes, both of them are sorted ascending. Maybe you were modifying inputs.

  • Custom User Avatar
  • Custom User Avatar

    The first one is wrong, but the last one is ok, it's one or more full rotation/s.

  • Custom User Avatar

    Looking at the example tests was no help?

  • Custom User Avatar

    in what language? In python, there are lists of strings.