Ad
  • Custom User Avatar

    You don;t have to delete it, we just need to mark the issue as resolved.

  • Default User Avatar

    Now i understand what you meant with "all faces identical", then the answer is no, i'm sorry for occupying your time.
    How do i delete this thread?

  • Default User Avatar

    I don´t know what you mean with all faces identical, sorry, english is not my first language.
    but i can explain what my code does, first of all, my code doesn't meet all conditions to work always, but
    this array met the conditions so thats why i explain at first why should be 3, my code goes like:
    first i iterate the int[] so (1)"if (int[i]+int[i+1]==7)",if meet the conditions there goes another iteration
    that will change place with another number of the dice that will not meet the last condition (1),
    Then will return a IntStream from 0 to int[].lenght-1 that will compare int[i] to a int[i+1] and sum 2 if are opposite,
    0 if are equals or 1 if is not the last two.
    Like i said, this code isn't infallible, but for this case should be good.

  • Custom User Avatar

    Does this procedure make all faces identical? If yes, what value will all dice show? 1? Or 2? Or something else?

  • Default User Avatar

    I had a problem in Java small random test.
    They give me {6, 5, 2, 1} expected 4, the minimum rotation is 3, because i can change 2 and 1 in positions
    and that would give me {6, 5, 1, 2} then applying rotations: 6 to 5 = 1, 5 to 1 = 1 and 1 to 2 = 1,
    giving 3 rotations in total.

  • Default User Avatar

    Very cool, but I feel like understanding the wording and the problem itself in this kata is a kata of its own

  • Custom User Avatar

    10/10 kata

  • Default User Avatar

    I liked this kata, there are definitely many ways of doing it. In my opinion this is the also kind of exercise where a more verbose solution is preferable to a one liner.

  • Default User Avatar

    I looked at this kata, thought it looked hard, and immediately went to the discussion to look for hints. The only one I found was yours to 'think a little bit', so I did, and then quickly banged out a 'clever' one-liner. (Turns out there were a couple of cleverer (or at least more efficient) one-liners in the solutions, but that's what happens if you rush). So thanks for the hint!

  • Default User Avatar

    It seams to be hard at first, but it is not so if you think a little bit ;)
    Its hard to get a oneliner but we are here to lern.

  • Custom User Avatar

    Approved.

  • Custom User Avatar
  • Default User Avatar
  • Default User Avatar

    approved at some point

  • Custom User Avatar
  • Loading more items...