Ad
  • Default User Avatar

    tricky, but not very enjoyable

  • Custom User Avatar
  • Custom User Avatar

    (c-version)

    there is a typo in the provided test: The output message labels both expected strings as "S2" - should be labeled as "S1" and "S2".

  • Custom User Avatar

    You're not doing it in-place.

  • Default User Avatar

    what is this error:
    expected [ '7', '6', '5', '4', '3', '2', '1' ] to deeply equal [ 'c', 'b', 'a' ]
    my code wotks in browser console though...

  • Default User Avatar

    nothing, obviously.

  • Default User Avatar

    Instructions are insufficient and tests don't provide any feedback information.

  • Custom User Avatar

    what should be return from function

  • Custom User Avatar

    This is a very tricky kata. You could have blame the author with such tricky problem, but just do what your mind says then viola it will work!
    then you will realize the logic the sensei wants you to know.

    clue: the function is void, the length is different and the sensei is clever.

  • Default User Avatar

    I dont understand , this is my output on my computer:

    s1:c b a
    s2:7 6 5 4 3 2 1

    but tests show:

    [Actual]
    S1: [1234567]
    S2: [abc]
    [Expected]
    S2: [cba]
    S2: [7654321]
    [Input]
    S1: [1234567]
    S2: [abc]

    please explain what happens ?

  • Custom User Avatar

    i dont understand what you need me to do after exchanging the values
    what should i return with

  • Custom User Avatar

    @Root-Exec. Find another way to exchange the content of the buffers you are given. Don't use **.

    As for my OP, that still stands. I think the Kata description should clarifiy the point about strings of different lengths. Meanwhile, tests work OK because even strings of different lengths are within equal sized memory allocations so...

  • Custom User Avatar

    Were you able to figure it out? I changed the tests to use char** for their arguments and that worked all the way up to the "uncheatedly" test which it failed.

  • Custom User Avatar

    You need to modify the contents of existing arrays a and b inside the function, and not assign references to new arrays by these variables (parameters).

  • Custom User Avatar

    Not a kata problem. In fact, I see no problem at all.

    Please amplify.

  • Loading more items...