To be really, really sure that Java uses double division instead of integer division by some unforeseen accident or changing method signatures in JDK 46 providing a Math.pow which operates solely on integers. Principle of least surprise.

how does it speed up things? I just found that the '+' can be also written as '{1,}' which would mean occurs one ore more times, is that somehow an internal 'string manipulation shortcut' that skips parts of the string, that match the pattern and is therefore faster, or how does it work, that the string can be processed faster?

To be really, really sure that Java uses double division instead of integer division by some unforeseen accident or changing method signatures in JDK 46 providing a

`Math.pow`

which operates solely on integers. Principle of least surprise.4,294,967,295 max unsigned or 2,147,483,647 signed 32 bit int value?

Nicely done, this way you keep the original array. Thanks for showing the use of Stream Collections, will copy ;)

Had the same question. Would be really handy if this was explained in the description of the kata :)

No, it's given as a decimal fraction.

genius!

Sorry I'd not been on here for years :))

How could one know if

`price_per_kg`

should be in`float`

. I finnaly gave up.What's printed in expected when running test cases in not accurate either.

This comment is hidden because it contains spoiler information about the solution

What's the point of decimal point in

`1./`

?Treat it like a matrix,(0,0) means first element of the first row(TOP LEFT) and (n-1,n-1) means last element of the last row(BOTTOM RIGHT).

how does it speed up things? I just found that the '+' can be also written as '{1,}' which would mean occurs one ore more times, is that somehow an internal 'string manipulation shortcut' that skips parts of the string, that match the pattern and is therefore faster, or how does it work, that the string can be processed faster?

Wrong replacement strings.

The interest is indeed given as a percentage

Is this something different than sieve algorithm that you lerned about?

## Loading more items...