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.
Didn't have to be so specific for this one, compare with mine.
Nice ternary though! 😎
This comment is hidden because it contains spoiler information about the solution
I assume you mean
[a-zA-Z]
and yes that's required to match upper case letters after the symbols.From experience it feels like a 4/5kyu.
Your comment helped me, I wondered why it didn't work for 20 and came to read the comments to see if there was a problem with the test cases, but no it was my own code. Rounding errors on rows 11 and 15.
Take a look at row 11 (
[1, 11, …, 11, 1]
). Compare it to what your outputs.Be careful with floating points!
This comment is hidden because it contains spoiler information about the solution
Depends on the language I guess, but yeah probably.
This comment is hidden because it contains spoiler information about the solution
Took me a while looking through the Array docs to find
product
, I was trying hacky ways withpermutation
before that.This code is better than my own though!
This comment is hidden because it contains spoiler information about the solution
Gaming the system!
I used
[a-z]
in mine as you don't want to.upcase
on non-letters.The letter after the underscore/hyphen matched in the regex.
There are brackets around the full stop, those brackets are what you can reference with
$1
and so on.Annoyingly I did it this way but the timeout's come down since then so it failed!
Loading more items...