Ad
  • Custom User Avatar

    Your solution fails for order(""). Did you test your solution locally with an empty string?

    Your solution seems to have a bug, it is not a kata issue.

  • Default User Avatar

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

  • Custom User Avatar

    Красавчик!

  • Custom User Avatar

    Hello, My Code passed Every test but one the extra test,even though i tested it in visual studio and it works fine, i used c#,here is the issue:
    Extra Tests
    Test Failed
    String lengths are both 46. Strings differ at index 21.
    Expected: "wha1t sh2all 3we d4o w5ith a6 dru7nken s8ailor"
    But was: "wha1t sh2all 3we d4o a6 w5ith dru7nken s8ailor"
    -how can i fix it?

  • Default User Avatar

    I like my pasta with hard shells and extra cheese, you know, for that squishy chewy gooey effect. It should also be a little wriggly, to really enhance the textures... Yum!

  • Default User Avatar

    Wondering if it has something to do with the number being at the start of the word, but that doesn't quite make sense

    But that's exactly it ;-) %[] only matches a non-empty sequence of characters. As soon as the match fails, sscanf() returns, without parsing the integer.

  • Default User Avatar

    you are iterating on an list with a foreach loop while modifying it at the same time, this is very rarely a good thing to do, as it results in code that is hard to understand and a high probability of bugs. in some scenarios, you effectively delete some elements before they have been looped on, e.g. consider:

    ["two2", "one1"] --> after the first iteration of your loop, this will be converted to ["two2", "two2"]. "one1" never gets iterated on.

  • Default User Avatar

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

  • Default User Avatar
    • Be careful with strncpy(), it is a terrible function. It does not nul-terminate dest if there is no nul byte among the first n bytes of src. As a result ordered is not nul-terminated in your code
    • your code does not work for e.g. "1 4 3 2 5"
  • Default User Avatar

    I dont know what I'm Doing HAHAHAH

  • Default User Avatar

    Even with everything commented out, I get the following error when I press the Test button.

    Traceback (most recent call last):
      File "/workspace/default/tests.py", line 3, in <module>
    Test.assert_equals(order("is2 Thi1s T4est 3a"), "Thi1s is2 3a T4est")
    ^^^^
    NameError: name 'Test' is not defined. Did you mean: 'test'?
    
  • Custom User Avatar

    Approved

  • Custom User Avatar
  • Custom User Avatar

    Not a kata suggestion ! ^^

  • Custom User Avatar

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

  • Loading more items...