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.
There are no random tests. All the tests are too small and rudimentary to provide any thorough testing.
The specs are unclear. What is the possible format of
outmult
? What ifstart
/end
is outside the range? (This is unspecified.) How to handle multiple segments? What if numbers go higher than 255?It is also not mentioned that
start
/end
starts at1
, orstart
can be greater thanend
(which makes no sense anyway; that's an empty range).I fixed the htmlize function in C#. Also some minor cleanup.
removed
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
The description addresses this scenario:
yeah that's pretty crappy tbh, I basically had to write two solutions because it wasn't clear from the description that BigInteger wasn't allowed.
It made it a more interesting problem without BigInteger, so I'm not complaining about that, but it should definitely say "no BigInteger" up-front.
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
same problem
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.
Loading more items...