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.
Don't know why yours is downvoted -- it's helpful
.
You're mutating s1 (changing the expected values), and even if you don't do it, your code will timeout. Find another way.
I think the reference solution somehow bugs on
[4,5]
.Thanks for your time solving the kata and being the first one in solving it in the ruby version.
I changed the test
[6]
for this one:[3,3]
, a valid one that has length higher than1
and, of course, with result0
.This comment is hidden because it contains spoiler information about the solution
'(()'
I believe it would return the following test case as true: validParentheses("())()(()")
but that test case is not a valid use of parenthesis.
true. I did it in one iteration.