Ad
  • Custom User Avatar

    like i said in my original post, this kata is solve-able by using basic algorithm. You can use library if you want, but by solve it using basic code, the coder will understand how the data flow. The result code might be longer, but it is good learning medium. Then again if the purpose of the coder is want to write code as short as possible then its a different matter.

  • Custom User Avatar

    On the contrary beginner needs to know how fundamental algorithm works. Nothing wrong if you want to use library, but know how to do the same function without using the libray is very useful, especially you need to learn another programming language.

  • Custom User Avatar

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

  • Custom User Avatar

    this is the best practices imho, without any library.

  • Custom User Avatar

    ah yes, thanks!

  • Custom User Avatar

    Manage to finish. I must refactor my code to acomodate to new knowledge that you will only get from the testing parameter, why not just incorporate this one example { "NORTH", "WEST", "SOUTH", "EAST" } to the description?

  • Custom User Avatar

    try to remove the break;
    in java, break after return resulting in error. I see you use javascript, might be the same.

  • Custom User Avatar

    no need complex solution to solve this kata, simple brute force method is viable.

  • Custom User Avatar

    Yeah thanks, thats the problem. i forget to sort it. All good now.

  • Custom User Avatar

    Hello,
    for example i took the example: new int[][]{{3, 2, 1}, {7, 9, 8}, {6, 4, 5}}. using java the answer from my local is [3, 2, 1, 7, 9, 8, 6, 4, 5]. it seems correct, but pasting the source code and run on codewars it return error.

  • Custom User Avatar

    it says: arrays first differed at element [0]; expected:<1> but was:<3>.
    lol what is that?? the answer is correct why the machine answer with that?