Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Your code is very slow, as you can read. Try to speed up him using dynamic programming ( basics of it )
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?
This comment is hidden because it contains spoiler information about the solution
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
You have to find two different elements of the given array arr that add to x.
I didnot understand this kata. Can some explain it to me. Thank you!!!
"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.
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?
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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...