Ad
  • Custom User Avatar

    Yes that helped a lot but what happens if you Move through:
    9
    3 9
    8 7
    ?
    post-Post Note:Ah with your wisdom I have gained enough knowledge to find a solution for this Kata,the only problem is that I'm too slow.Might be time for some memoization.

  • Custom User Avatar

    A climb round is the absolute difference between the height of two locations. Moving through "0 1 0" results in 2 climb rounds because "0 -> 1" is ascending 1 and "1 -> 0" is descending 1, which is a total of 2.

  • Custom User Avatar

    Are you really a Java expert?
    And never used comments like "//"?!

  • Custom User Avatar

    I need some more clarification on "Number of climb rounds between adjacent locations is defined as difference of location altitudes (ascending or descending).".I'm looking at the test examples and I still don't get it.I know that I can solve it but I just don't understand what is being asked of me.

  • Custom User Avatar

    Maybe you should have tried solving it before looking for it in the TextBook?People like you are always strange to me just because Google gives you the solution on the first page doesn't mean that the problem's difficulty changes...

  • Custom User Avatar

    For Java, the last part of the details reads: "Any whitespace at the end of the line should also be stripped out."
    My solution does away with any whitespace at the end of the line, but one of the tests fails, see below:

    org.junit.ComparisonFailure: expected:<...
    e

    e[

    ]> but was:<...
    e

    e[]>"

    Should this test not pass on account of the above-mentioned part of the requirements?
    Thanks!

  • Custom User Avatar

    perfectly true, but that won't change now (more than 800 completions)

    cheers

  • Custom User Avatar

    Using String[] instead of char[] to store characters in Java is very stupid.

  • Custom User Avatar

    You're correct and I solved the Kata.Godspeed lad.

  • Custom User Avatar

    It IS NxN. This is just multiple mazes output in a row.

  • Custom User Avatar

    .W...
    .W...
    .W.W.
    ...W.
    ...W.
    .W...
    .W...
    .W.W.
    ...WW
    ...W.
    ..W
    .W.
    W..
    .WWWW
    .W...
    .W.W.
    .W.W.
    ...W.
    .W...
    W....
    .....
    .....
    .....
    .W
    W.
    .
    This ain't a NxN maze BRO.Fix the Details.Something like "The maze can be in any shape or form."

  • Custom User Avatar

    Codewars is meant to be a self-help training site where you can work on your coding skills.It's not the Kata creator's job to limit you.Just like there's nothing stopping you from copy-pasting the solution from Google but what's the point in doing it?The only one that's at a lose is you.

  • Custom User Avatar

    @johndoe235 due to your posting this issue, I took the opportunity to scrutinuze this and my other two kata under C99 (cheers to @monadius for pointing me in this direction) and I managed to completely erradicate all of their warnings, thanks again!

  • Custom User Avatar

    Thank you for the feedback!

  • Custom User Avatar

    fixture.c:8:5: warning: implicit declaration of function 'tester' is invalid in C99 [-Wimplicit-function-declaration]
    tester(10, alice, bob, "maze", 0, 0); // Alice goes first, Alice wins

    Aside from that Visual Studio,Online Compilers and Linux all run my code without problem.
    
  • Loading more items...