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.
Sorry about that, no excuses other than a brainfart on my part (in my defense I had a few drinks during the translation lol) I'll fix it ASAP
haha so much for "eval" not being included with JavaScript. When i first read the kata I thought it would be super easy because this solution was an option, but then i read that eval was disabled so I did a much longer one. Wish I would have just done this since obviously it's not disabled.
Seriously whoever did the C# version, PUT IN THE DESCRIPTION THAT BIGINTEGER ISN'T ALLOWED. Multiple people have said it.
As a hint for those struggling, the description leaves out that you should assume if the bill given is a 100, a 50 should be given first priority for giving out change. If you assume this then the solution should be fairly simple.
Still unable to find out why the htmlize function doesn't work with codewars but does on other platforms, but I'll look into it and update whenever i find a solution.
This comment is hidden because it contains spoiler information about the solution
Probably an somewhat-unexpected place to include this would be after the multiplier is performed. Such as when a value of 150 is intially retrieved but after the multiplier becomes 300, but every other value in the string is less than 255. I'll have to think about how to implement that. Thanks again for the suggestion.
After looking at your solution, I wish I would have added an error case where the end value came before the start value. For example, what if the start value was 5, the end value was 19, but the binary string was [22,19,7,14,5]? Ah well, too little too late lol
Sounds good, thanks for the suggestion! I'll work on it.
There are some problems with a couple of the test cases. Some of the test cases are able to return multiple values, and there is no explanation in the description as to which value to return in this case (specifically working with C#, i don't know if this is an issue in other languages).
A great example is "? times 11 = ??". ANY number except for 0 and 1 works.
Another one I'm running into trouble with is "-5? times -1 = 5?". Any number except for 5 and 1 will work.
Thanks for the feedback! Since this was my first Kata I'm glad you liked it.
Thanks for fixing this issue.
I actually initially coded this solution in C#, and after getting the 22/0/1 response to the test cases I switched to Java (since I didn't use LINQ it wasn't really difficult) and tried again. I got another error, then refreshed the page, pasted in my solution and it passed. So I guess after refreshing the page the test cases for my Java solution went into the 25% category lol.
I'll retry my C# solution now that you say it's fixed. Thanks again.
One of the random tests uses a large negative value (i.e. -1275939367) and throws an error. I tried to get around this error by just saying return -1 if the input is less than 0, but then it said the expected return was a large negative number as well. I keep getting 22 pass, 0 fail, 1 error because of this error. Please fix it.