Ad
  • Custom User Avatar

    It will count how many times that character is repeated in that text. if you put set in a loop how its going to count the repeated character.
    for example aditiyan
    a=2
    d=1
    i=2
    t=1
    i=2
    y=1
    a=2
    n=1

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Your code is very slow, as you can read. Try to speed up him using dynamic programming ( basics of it )

  • Custom User Avatar

    i have passed the test but when trying to submit this returns

    "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"
    any solution?

  • Custom User Avatar

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

  • Custom User Avatar

    n - you go north
    whats the opposite of north? south
    s - you go south

    so go north 5 times, south 5 times
    +5, then -5. youre back at starting position now

  • Custom User Avatar

    You have to find two different elements of the given array arr that add to x.

  • Custom User Avatar

    I didnot understand this kata. Can some explain it to me. Thank you!!!

  • Custom User Avatar

    "Isn't it suppose to be false?"
    No. This set of direction moves back and forth. The case You assume should have "n" in last element. Then end wil be in different point than start. Last argument which is "s" moves You back to start point so condition in this case is true.

  • Custom User Avatar

    I still don't get it. The requirement said it's must be back to starting point, then why isValidWalk(['n','s','n','s','n','s','n','s','n','s'] return true?
    First point is n, last point is s. Isn't it suppose to be false?

  • Custom User Avatar

    You need to count how many squares / blocks you are going to walk. Therefore, the matrix must have exactly 10 values.
    The second point is that when you go, you need to go back, so if you walk in one direction, you need to go back the same number of times.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Loading more items...