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.
Thanks, it's my limited understanding of a subsequence, though it would be helpful to have shown axbxixgx... in the instructions. I guess maybe you can consider the test cases as part of the instructions. I'd say this was an 8kyu or 7kyu iff the subsequence was continuos as it's a one liner.
6kyu is about right for this one.
As for rankings in general there are (at least) three aspects:
I'd guess 1kyu is really awesome but might take months.
That perfectly matches the definition of subsequence so that's not a problem. See: http://www.codewars.com/kata/longest-common-subsequence/
Also, are you sure that's
8kyu
and6kyu
? It's obviously just7kyu
. (Though someone ranked it1kyu
for some reason).It is clear that the letters of abigail are to appear as a subsequence. Clearly the last test case shows that it is required to find the that letters even when they are not consequetive in the input string. This is not stated at all in the instructions and if anything the instructions ask to find 'abigail' as a subsquence. This needs fixing either way. It also might be that you are just looking for a.b.i.g.a.i.l with only one intervening chracter delimiting the required letters. Or maybe you the intervening characters must match each other? This an 8kyo as stated but about 6kyo when looking for non consequetive characters.
It would be helpful to explain that null and single charater strings are to be considered IN ORDER. And that strings whic neither ascend nor descend eg. "oo" should also return IN ORDER.
Hi all, The only way I got this to give me a pass was to make a the program wrong.
If I promote the input argument to a 64 bit integer (unsigned or signed) then the program will run correctly according to the specification. However to pass the "SUBMIT" tests the program needs to run wrongly. One of the tests at least, needs to pass through a stage where the number gets as large as about 45x10^9. This can not be held in a 32 bit integer. So the alogirthm means that after every stage the number is modulo 2^32.
Please consider suggesting that the input agument is long long int and using the same test data.
Ed