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 does the variable 'isComplete' stand for? What is complete? I cant catch that one.
what is wrong with a simple if logic solution? Everyone can read it and computers work great in this booring way. lol
Warning for all the three star programmers. Check this out: http://wiki.c2.com/?ThreeStarProgrammer
Would it be different story if the string was HUGE, i mean huge...in the test case? Wouldnt people really need to
write theire own parser in that case? Take down the problem to what it should be, digit by digit, remembering the reminder, take out zeroes at the end, inverting the string, return it. Well, i wrote exaktly that, my own parser, and compared to the work of one row of code and what i had to do, sat whole night and today, trying to figure what is wrong...and louds of code, rows, then 4 kuy is ok. But the easy way in c# to ashieve this, well way to easy if you use the mentioned BigInteger stuff. lol what to say?
Put in a test case with string length of 1000 and se what happens. :)
exactly. I wrote my own parser in c# and it can work out unlimited lenght of strings. But writing that one row of code, and have kuy 4? No way.
But as i did, wrote my own stuff, i think i earned the kuy 4. :) I did, coz im so dumb at c#. Dont know there was such a easy way to solve it in c#. I programmed c++ for a while though. So of course, i dont know the easy ways in c#. :)
This one and the other one, took the same code and pased. And i have written my own parser, so it dont matter how big the string is...no limits...haha. works on both.
But why so high kuy as 4 if the one row of code fix it in c#?
i agree. I didnt know the parse methods that exists in c#, im new to C#, so i wrote my own parser.
But since there wasnt any big string tests, thoose passed. One line of code, for those who knew this, in c#. lol
But you should add test case with big big string. :)
Like: "58734598475498574598675934867349567459346853465349568349563495634589"
and: "893475934834985983467593483495834953459345934759348573495783495873495347593475934753495734957348957345"
:D
its way to simple in c# to solve this. I didnt know the
parse methods....one single line of code fixed this, for some people.
But i wrote my own parser. :) Sattisfied with that.
And some sollutions dont work on very large strings. lol
Try to parse: "478953489548953475934857349857349534759347534957349573495734598347598347593475"
Haha. :)
You should include big big strings as test case dude! :)
Youre right. :) this was way moore interesting with this pattern difficulty.
Solved it. Maybe you should write something about that there is a need of finding a pattern? :)
Just to help people think right. :D Nice kata i say. I like doing games, and this one was fun!
And sorry i didnt recognize the pattern part of the problem. :)
And sorry for saying there was an issue. lol yes there was, it was me! :)
There is an issue here, the last random test, throws a time out error, >12000 ms....
And if its my alghoritm that is slow, dont think so...I think youre random test is to big.
The last test. I saw figures as big as 200000 on the k value. Its way to big and to many iterations....
If my algoritm gives correct answers with 1000 steps, it would give me correct answer with 200000 steps. No
need to have so many. As for now, i get ok on all the tests, but the last test, the one with big k value, gives me
time out error. e.g time > 12000 ms.
Pls change this. Fun otherwise. Im running c# version.
i looked at the test cases, check this out:
Assert.AreEqual(new int[]{0, 0},kata.ChessBishopDream(new int[]{1, 1},new int[]{0, 0},new int[]{1, -1},1000000000));
1 bilion iterations. And how am i suposed to manage that in 12000 ms? :)
code exited with sigsev signal, what is that?