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.
O(n) variation aimed at 6 kyu, perhaps 5. Or do you have any other suggestions for interesting variations?
This comment is hidden because it contains spoiler information about the solution
Nice one. Do you think an easy variation of this problem could be interesting to have as well on this platform?
Your solution passes all non performance tests now on submit.
You are right, the ref sol was 1 off in some edge case. In this example, it mistakenly thought it would make the view. Fixed
I don't get the test case
height: 1, width: 1, y: -4, x: -9, thought: 'Mirrors'
At time t = 0, the text 'M' starts at
y = -4, x = -9
and does not appear in the view.At time t = 1, the text 'Mi' starts at
y = -3, x = -8
and does not appear in the view.At time t = 2, the text 'Mir' starts at
y = -2, x = -7
and does not appear in the view.At time t = 3, the text 'Mirr' starts at
y = -1, x = -6
and does not appear in the view.At time t = 4, the text 'Mirro' starts at
y = 0, x = -5
and does not appear in the view.At time t = 5,
y > 0
and the text can no longer enter the view.Thus, I return
0n
, but the test expects5n
. Why?fair
The comment was from before you changed it.
Still, no real solution would use more tgan one line, it's an unnecessary check that clutters the kata title.
but semicolons and newlines aren't allowed (i forgot to add that test)
I agree, just call it "Code Golf: ..." instead. This is consistent with other code golf kata's.
i forgot i removed that test...
eh maybe; i'll just up it to like 40
I'm not sure about the new character limit. Seems a bit too strict. Depends how much variations you would like to see pass this kata.
you'd have to be very lucky
done
Loading more items...