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.
what is this madness
Ok, I see, easy fix and I passed. Thanks.
i'm sorry, this is my fault; the assertion message was incorrect when
n > 254
, and the memory was not reset at every test, which caused confusing assertionsI fixed that and republished. Your code is still wrong though, for the reason I said.
That doesn't seem to be the issue, as the error appears for n = 254:
for n = 254, at index 232, expected: "#e9e9e9" but got: ""
the index where it doesn't find any entry seems to change everytime I run it, attempting again, I get
for n = 254, at index 193, expected: "#c2c2c2" but got: ""
.you have to generate shades even when n is larger than 254, it's just that you stop at 254
This comment is hidden because it contains spoiler information about the solution
Thanks for this, the comments are nice xxx
If you program recursively, the intermediate fractions need to be stored in memory. But this probably only takes up a little more space on the stack until the function finally returns, so even with millions of calls it doesn't really matter.
Nice demonstration of xlat!