Ad
  • Custom User Avatar

    Hello Loza!
    It was really smart for you to use String and its length to check the numbers.
    I just wanted to let you know that you could be using less "for" at the end. You skip every 3 steps, therefore instead using i++ or j++ you could be using i += 3 and j +=3, and then adding an inside "for" to loop through the numbers. Not sure if this will help but remember that in a "for" it is not necessary to implement a n++ at the end, you can implement anything you want.

  • Default User Avatar

    Good point Dario! Didn't really think about it, thanks!:*

  • Custom User Avatar

    Hello Oscar!
    Whenever you create an int[] in java it will set every value as 0. In this case, once you have set int[][] board, it will be already filled with 0s.
    I hope it helps!

  • Custom User Avatar

    Hello Oscar!
    Whenever you create an int[] in java it will set every value as 0.
    In this case, once you have set int[][] board, it will be already filled with 0s.
    I hope it helps!

    PS: Loved the way you coded "play" with all functions, really easy to read

  • Custom User Avatar

    A lot of the testsomething random are worng.
    The array:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    53
    11
    32
    25
    96
    82
    47
    28
    6
    63
    87
    66
    7
    40
    72
    58
    46
    45
    33
    63
    56
    8
    47
    16
    11
    0
    8
    92
    92
    50
    50
    46
    97
    70
    10
    47
    45
    27
    10
    13
    Should return [10, 49] as the 10 first positions are correct but from the 10th to the 49th are not, well [0, 49] was expected.
    Happened again. Array:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    74
    9
    52
    43
    70
    48
    72
    92
    23
    66
    67
    52
    14
    1
    57
    43
    15
    33
    48
    86
    42
    43
    49
    32
    65
    33
    42
    15
    4
    58
    23
    55
    48
    73
    62
    14
    25
    1
    72
    92
    Should be [10, 49], but expected [1, 49] it even makes less sense than before
    Once again:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    44
    13
    11
    46
    19
    66
    98
    19
    84
    25
    40
    95
    25
    83
    36
    49
    11
    89
    91
    14
    36
    85
    31
    2
    57
    44
    22
    92
    19
    10
    72
    38
    4
    49
    87
    78
    46
    47
    18
    3
    [2, 49] was expected, is it something that I am not understanding?
    Another:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    64
    80
    47
    80
    52
    20
    27
    81
    27
    25
    99
    48
    62
    47
    65
    58
    89
    72
    52
    50
    77
    73
    22
    37
    14
    26
    35
    82
    42
    16
    68
    34
    15
    36
    65
    34
    38
    41
    28
    9
    [9, 49] expected, who made this?
    I can keep going, the make lense sense everytime I try, it is the only test I am failing:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    91
    86
    37
    85
    43
    30
    34
    24
    50
    41
    23
    32
    51
    69
    70
    30
    48
    70
    93
    36
    52
    67
    76
    27
    37
    91
    97
    70
    96
    53
    72
    32
    54
    5
    42
    59
    63
    94
    66
    92
    [5, 49] expected, is the first number just a random number or what?

  • Custom User Avatar

    If you link anything else after your github account the profile pic will be switch. You have your github profile picture as CodeWars profile picture just click the link to github again.