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.
OP solved it, closing
Good for you. Here in JS we have to write them ourselves.
Thanks for the sample test. This one helped me work it out. Greatly appreciated :)
I belive that you are confused for "West" with "Left".
Taking 4 Lefts will return you to same point but walking towards west 4 times won't bring you back to point where you started.
It's recommended to fill in the exmaple tests but are not mandatory, and since only a few tests is already mostly sufficient to test for correctness it's not that much of an issue.
The author gave us the maximum size to be expected, so I see no point in worrying about it.
What's the problem?(I don't understand
array with length 100_000+
) ;-)?<= denotes a 'positive lookbehind'.
Basically the regex is looking for any character between a-z(or A-Z, which is unnecessary because the scan() function is automatically case insensitive) where the preceding character is #{letter}
E.g if letter = f
The regex would match
fa
but notf.
Case insensitive.
So, regex will trigger to AEIOU too.
1 <= n <= 1e9
Do you think your code can create an array of 1000000000 elements and operate multiple times?
What you need is to derive a formula to solve the problem, rather than brute force ;-)
anybody can see it on the dashboard when you post the comment if you didn't hidden it ;-)
two times saw your solution in your comment. Please mark it as having spoiler content next time.
you should to know: is infinite is
true
, not infinite isfalse