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.
ok
That kata asks to find the fraction with smallest denominator inside a specific range, and allows
O(n)
solution. This one is completely different (finding the exact representation of a fractional value inO(log(n))
).found it: link, not sure it's a dup though
The description spoils the whole algorithm for the task, essentially trivializing the kata.
I'm sure it's a duplicate of a recently (last months) approved kata (Haskell) (author: PaulRobertson)
Notice that the test (you can read it in "Sample Tests") is
$this->assertEquals(1.146651, going(8));
so the expected is1.146651
but PHP "assertEquals" shows it as1.1466510000000001
.This comment is hidden because it contains spoiler information about the solution
Not a suggestion.
Is there a specific reason you only test square arrays? I feel like it would make more sense if we had some tests which included non-square and even non-rectangular arrays.
Also, in the random tests, it's a bit weird to me to populate the entire array using the same value, and also that you only test the 3x3 case.
same problem
Failed asserting that 1.146652 matches expected 1.1466510000000001.
Failed asserting that 1.0067120000000001 matches expected 1.0067109999999999.
Who said code can't be sexy.
We might introduce a new voting system: Best practice, clever, code resembels boobs. ;-)
same problem
Hey, and what about creative hardcoding? ;-)
Loading more items...