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.
I was feeling pleased that I found and multiplied the digits without converting/parsing strings, but this method of doing it is brilliant!
Nice way to traverse the digits!
Very true ! thanks
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Writting down the detailed steps on a paper helped me to clarify the algo ;)
So basically solution can be reduced to 2*(x1 * 2^0 + x2 * 2^1 + x3 * 2^2 ... xn * 2^n-1) + 1 or something similar, I see it now when I write it on paper, but why?
Is that generally known or you came up with this because of this kata?
Thanks for your answer.
It doesn't help me to find what tests are done in SinglePairNoNestingTests but it helps :)
I'm pretty sure there are no tests that define the opening/closing characters more than once in separate pairs.
So by definition yes it should work, but you are trying to achieve more than the kata requires you to.
For the record, I wouldn't be surprised if the reference implementation I wrote failed on this test. :)
I'm trying to understand what hides the test SinglePairNoNestingTests :) and I'm facing a question :
Should this be ok or not ?
Kata.IsBalanced(")(", "())(")
This comment is hidden because it contains spoiler information about the solution
Funny code :)