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.
@madgergely , you code has a bug, if I (the same address) call
makeMove
twice I will win all the ether. Not ideal...How do you make sure that leading zeros are added?
IE, "01:01:01" rather than "1:1:1"
This algorithm is incorrect.
It passes only because of the limited testing required on submission.
The 4, 9, 40, 90 etc that you are trying to catch with (p<c) can only be done in the first position.
Test.assertEquals(solution('CMXCIX'), 999, "Your algorithm gives an answer of 1021 and fails on this test.");
Note, this answer, although sleek, doesn't actually use memoisation.
I have created a 'fork', I suppose only time will tell if someone will do something with it.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution