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.
I could be doing something wrong but the random test case is generating values that are too large to store in any data type. This post, I assume, is referring to that. I am using Java and storing the product as a long.
Edit: I found what the workaround is and I imagine that is why this is 6 kyu and quite the challenge. Very cool! I like what this does. :)
Could you elaborate?
Issue with random test cases in java
can anyone explain why we do n-1 ?
Hello, I don't know if you've figured this one out yet, but essentially you're checking every list and its indices against each other. So when you write [1,2,3,4,5,6] == [2,5,6,4,3,1], you're essentially writing [1]==[2], [2]==[5], [3]==[6] etc.
A list is a series of indexes with each index containing something, so you're not just checking to see if the contents of the two lists are the same, you're checking to see if the contents of each list is the same AND is in the same place (i.e at the same index) of both lists.
This comment is hidden because it contains spoiler information about the solution
In Ruby it's very simple too, some of the 7 kyus are harder than this.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
superb solution!
can anyone expalin me [1,2,3,4,5,6] == [2,5,6,4,3,1]--> False
but ['a', 'c', 'e', 'r', 'r'] == ['a', 'c', 'e', 'r', 'r'] --> True