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.
You don;t have to delete it, we just need to mark the issue as resolved.
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?
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.
Does this procedure make all faces identical? If yes, what value will all dice show? 1? Or 2? Or something else?
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.
Very cool, but I feel like understanding the wording and the problem itself in this kata is a kata of its own
10/10 kata
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.
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!
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.
Approved.
Python translation
C translation 🎲🎲 (author gone)
approved at some point
approved
Loading more items...