Ad
  • Custom User Avatar

    i agree to you

  • Default User Avatar
  • Default User Avatar

    so when count is used in a comparison, it appears as soon as the conditional fails it stops rather than counting the entire array and then comparing. I used count strictly to find the amount and my solution timed out and had to implement another way.

  • Default User Avatar

    reminds me of a manager I had. no matter the task, always ended it with "Should be easy".

  • Custom User Avatar

    Ou, now I got that part of the task right :) Then it's easier than I expected. Thanks!

  • Custom User Avatar

    That's the error message, the first value is what your function wrongly returned and the other one is the expected value, print the input to debug your code.

  • Custom User Avatar

    (W<->E or S<->N side by side).

    You forgot that.

  • Default User Avatar

    I am not sure if this test case is explained in the desription:
    ['EAST', 'EAST', 'NORTH', 'WEST'] should equal ['EAST', 'NORTH']

    I will post exact text from the Details

    *Write a function dirReduc which will take an array of strings and returns an array of strings with the needless directions removed (W<->E or S<->N side by side)

    ----Side BY Side is the main ingredient----

    *In ["NORTH", "EAST", "WEST", "SOUTH", "WEST", "WEST"], "NORTH" and "SOUTH" are not directly opposite but they become directly opposite after the reduction of "EAST" and "WEST" so the whole path is reducible to ["WEST", "WEST"].

    ----Again North and South were cancelled, because East and West are Side By Side----

    There are no Side By Side cancellations in ['EAST', 'EAST', 'NORTH', 'WEST'].
    Please copy and paste the text from the Details that explains this test case

  • Default User Avatar
  • Default User Avatar

    Buckethead mentioned, now I have to pass this kata. I wonder what anagrams we can make out of Shawn Lane, Allan Holdsworth, John McGlaughlin, Joe Pass, Wes Montgomery, Pat Metheny, and Dave Fiuczynski

  • Custom User Avatar

    Got it! OK, it wasn't clear to me, but I see we can't approach this from a position standpoint now. Thanks for clarifying.

  • Custom User Avatar

    No, and read the notes:

    Not all paths can be made simpler. The path ["NORTH", "WEST", "SOUTH", "EAST"] is not reducible. "NORTH" and "WEST", "WEST" and "SOUTH", "SOUTH" and "EAST" are not directly opposite of each other and can't become such. Hence the result path is itself : ["NORTH", "WEST", "SOUTH", "EAST"].

  • Default User Avatar

    The instructions describe that the paths have the property of commutativity

    Where do you see that? There are no errors in the tests that are the same in all languages (kata passsed by 49 people in Julia out of a total of 66,386).

  • Default User Avatar

    strong suggestion ~ I updated my recent translation for this! thanks

  • Default User Avatar

    The description is that all eggs after consonants are supposed to be removed.
    It would make sense to have a few test with a vowel (or another character) followed by 'egg'.
    'neggo egg' => 'no egg'

  • Loading more items...