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.
C translation
Python translation
Python translation, please review.
JS tests. In the fixed tests, this block:
should be replaced by:
(Testing sin and cos, and changing the value for sin.)
My implementation returns the 1.000.000th element of the sequence in about 400ms. Why do the tests time out?
This comment is hidden because it contains spoiler information about the solution
Sorry, I beat you to it. (Duplicate)
This comment is hidden because it contains spoiler information about the solution
Very nice one!
It seems that the value of n can be easily cranked up to 5 * 10^6...
module
name is mispelt, everywhere.I suggest you add a link to "Tiling a rectangle with squares" for users that want an additional challenge.
Or recommend that sorting values be achieved in
O(n)
, letting laziness work for you, and taking advantage of the fact you can generate presorted values, instead of dumping a limited ( but higher than necessary ) number of sorted values into one big bucket and having to then sort them from scratch inO(n log n)
.How can that list for θ = 1.618, sorted, contain only integers? Where did 2.618 in the list go?
OK, so
cn(θ) = S(θ) - θdn(θ)
. But what isθdn(θ)
? Is itmap (* θ) dn(θ)
somehow? Isdn(θ)
equal tomap (* d) n(θ)
? What isn(θ)
? Isdn
a lexeme, isθdn
a lexeme?Why is "irrational" in quotes? Why does θ have two asterisks? Is there a missing footnote somewhere?
Please specify in bold, blinking all-caps that your sequence is indexed 1-based.
Or just use 0-based indexing. Why waste a perfectly good number ( and go against established convention ) ?
This comment is hidden because it contains spoiler information about the solution
Loading more items...