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 disagree, us0rman; the point of Katas is to build your programming skills. Part of this skill set is writing understandable, maintainable code. Using this formula, the function of the code will never change; thus maintainence will never be necessary and as such; this is excellent use of a Kata.
Kind of unfamiliar with Javascript. Shouldn't you also avoid changing given parameters?
This comment is hidden because it contains spoiler information about the solution
Yes. Which doesn't make this the best solution in terms of performance. In terms of ease, however, this is as simple as it gets.
Aha, I completely overlooked the sample test cases because of the description. Changes have been made so sample-tests match actual tests as per description.
Added Java Translation
Please read carefully and accept! :D
Added Java Translation
Attempting to keep as true to original Test Cases as possible, although safeguard against repeated 0 tests has been added.
Added Java Translation
Data takes form of 2D array.
EDIT - Adjusted Random Testing to be consistent with original Kata.
Kumited Java translation awaiting approval.
markus.benko, that is a crazy smart solution you have. Here I was feeling happy about my use of a hashmap.
Presumably because of the comment describing how the pattern was derived
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
int[][] sudoku = {
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2},
{5, 3, 4, 6, 7, 8, 9, 1, 2}
};
Returns true, when it is quite obviously false. Clever use of mathematics, and is applicable, but this is not a solution.
For those who see this and are still interested:
if (i < 3), r at index i is copied from s, r[i] uses the defined tribonacci sequence.
Loading more items...