Ad
  • Custom User Avatar

    In java version I've not passed tests for odd numbers less than zero. For example -3 occured twice or more in arrA and arrB, but this number are not expected in final list.
    I've wrote "quickfix" for filtering odd numbers less than zero and pass all test.
    In reference solution I've found line like this "i % 2 == 1 : 0 (by odd or even)". But for numbers less than zero we take -1 for odd numbers hence negative numbers are filtered in reference solution.
    Maybe I've not understand this task, please check my points.

  • Custom User Avatar

    Its ok now. Thanks for quick fix!

  • Custom User Avatar

    I've found next tests in random tests suite:

    Incorrect answer for board:

    000|000|080
    258|790|000
    041|036|257
    ---+---+---
    106|179|504
    109|400|076
    004|368|910
    ---+---+---
    792|600|143
    000|010|005
    005|203|008
    

    Fourth and Fifth lines are started from 1 "106......" and "109......". Thats invalid sudoku board, because we have duplicate value (1) in first column.

    Incorrect answer for board:

    009|088|040
    002|000|630
    304|625|870
    ---+---+---
    405|168|090
    080|509|120
    100|702|500
    ---+---+---
    008|203|400
    006|890|307
    

    In first line we have duplicate value (8) (...088...)

    And so on.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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!

  • Custom User Avatar

    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!

  • Custom User Avatar

    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.

  • Custom User Avatar

    Many thanks for kingdoms episodes!

  • Custom User Avatar

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

  • Custom User Avatar

    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.