• alxappicommented on "Evaluate the Group of Parentheses" kata

In Java version I've found next fixed test with unbalanced parenthesis (26 left, 27 right):
`(((()()(()(()()()(()()(()()(()))))))(()))()(()()())))` (note 4 closing brackets at the end).

Following error message for this test is:
`2*(2*(2*(1+1+2*(1+2*(1+1+1+2*(1+1+2*(1+1+2*(1))))))+2*(1))+1+2*(1+1+1))) = 790 ...` (note 3 closing brackets at the end).

It should be fixed.

• 4izhcommented on "Find the index of the second occurrence of a letter in a string" java solution

Thank you for the answer!

• Eugene49commented on "Find the index of the second occurrence of a letter in a string" java solution

This comment is hidden because it contains spoiler information about the solution

• 4izhcommented on "Find the index of the second occurrence of a letter in a string" java solution

I understand how it gets the index in string, where is really a second 'c', but how it returns -1 in other cases?

• koba1996commented on "Finding Arrows in a String" java solution

You are absolutely right, it was not working properly for cases where the arrow starts from the beginning of the string. My python solution contained the right version of the operator, but somehow I mistranslated it. Sadly there were no fix tests with an arrow starting at the beginning of the string, so thank you very much for your insight!

I updated the solution, and also added a sample test with string "-->" to cover this case.

• alxappicommented on "Finding Arrows in a String" java solution

In searchArrows method (7th line): while (j > 0 && string.charAt(j) == ...) {

Should be: while (j >= 0 && string.charAt(j) == ...) {

Mine solution pass by luck (after almost 10 attempts), but others cannot solve this kata in Java for this reason (IMO).
In any case, I appreciate your contribution for Java branch. Thanks for all your work!

• alxappicommented on "Gigabyte Storage" kata

When I saw low satisfaction rating and few completions for this kata I was afraid. If you in doubt will or not just jump in this kata. It is solveable, well designed and can give you good experience. Many thanks for Gigabyte series!

• alxappicommented on "Mahjong - #1 Pure Hand" kata

Maybe I'm late with help.
You are completing hand with fifth 3 in this case.
Description says: Note that there are EXACTLY 4 identical copies of each kind of tiles in a deck.

Thanks! :)

• alxappicommented on "Kingdoms Ep.3: Archery Tournament" kata

Many thanks for kingdoms episodes!

• alxappicommented on "Polybius square cipher - encode" java solution

For this task your solution is good enough. I'll vote it up.

• alxappicommented on "Equal Sides Of An Array" java solution

Many thanks for feedback. I'm not a programmer, and I do not pretend on Best Practice Solution for all tasks that I've solved on this webcite. In my opinion this task is not about performance. My O(n^2) solution was good for test conditions and I'm happy. I've recommend 6kyu kata Grazing Donkey by hobovsky and 6kyu kata Count a Spiral by Flurin Brühwiler. This katas is about performance. Good luck and have fun.

p/s Your solution on this kata in top 10% in my opinion and I'll vote it up.

• Torbjorn_galdracommented on "Equal Sides Of An Array" java solution

This code violates the DRY principle and has a bad performance.
Computing leftSum and rightSum at each iteration results in O(n^2) time complexity.
remove() method also gives a negative impact (it's O(n) operation which forces to shift all elements in the ArrayList to the left by 1).