• ###### Filip Hermanscommented on "Pandigital Sequence" kata

I added an extra line in the rules for this

• ###### aj_andrewcreated a suggestion for "Pandigital Sequence" kata

This could just be me, but I was somewhat confused by the description. It could be more clear that the goal is the next size pandigital numbers greater than offset. Perhaps that was obvious to others and I was just being dense!

Anyways, fun problem!

• ###### Filip Hermanscommented on "Price War" kata

You're absolutely right, (I messed up the numbers myself)
Should be better now

thanks

• ###### ZED.CWTcreated an issue for "Price War" kata
``````Returned price doesn't match expected value.
``````

It does not help to debug
Please use `assertEquals([message ,]expected, actual)` instead of `assertTrue...`

• ###### ZED.CWTcommented on "Price War" kata

Ah, that's a lot easier to understand, i misunderstood that you is a shop owner or some that buys from suppilers and sells to demands...
From the desc there is

``````using 14.84 would give following results
supply sequence [ [750, 14.75], [650, 14.84], [850, 14.85] ]
and a revenue of 14.84 * 250 = 3710
``````

Shouldn't it be `a revenue of 14.84 * 0 = 0`
Because `the second buyer does'nt go over 14.50`?

• ###### Filip Hermanscommented on "Price War" kata

I extended the initial example in the kata with the same explanation to clarify.

thanks

• ###### Filip Hermansresolved a question on "Price War" kata

Hi,

Those details are described in the rules.
The crucial part is following:
The demand is filled in the same sequence as set in the challenge (from left to right), the supply is used up from lowest price to highest.
The capacity of the supplier with the lowest price is used up for all demands, before the next is consumed.

Let's say you set a price of 19.19.
In the example this means first 2000 pieces are consumed from supplier with price 16.00.

After fulfilling supplier 1, following demand is remaining:
[ [100, 23.10], [888, 19.19], [3000, 11.8] ]

This is all consumed from the second supplier who has a capacity of 5000.

So if your price is 19.19 then no demand is left to fullfull.

Also the way you calculate your revenue is wrong.
It is the amount of your capacity sold for the price you set.
For 16.99 your revenue is 500 * 16.99 because all can be sold in that case.
For 19.19 your revenue is 0 * 19.19 because nobody want to buy from you.

Does that help?

• ###### ZED.CWTcreated a question for "Price War" kata

More detail is required on examples in the desc.
Like this one

``````Example 1 - supply > demand
+ demand = [ [1100, 25.13], [1000, 23.10], [888, 19.19], [3000, 11.8] ]
+ supply = [ [5000, 17], [2000, 16] ]
+ capacity = 500
+ => optimal price = 16.99
``````

So i guess

``````revenue = (16.99 - 16) * min(1100,500) + (16.99 - 16) * min(1000,500) + (16.99 - 16) * min(888,500)
= 0.99 * 500 + 0.99 * 500 + 0.99 * 500 = 1485
``````

Then why cant we set price at like 19.19, then we get

``````revenue = (19.19 - 16) * min(1100,500) + (19.19 - 16) * min(1000,500) + (19.19 - 16) * min(888,500)
= 4785
``````
• ###### Filip Hermansresolved an issue on "Pizza Slicer" kata

you're right
I will remove it

• ###### Filip Hermanscommented on "Pizza Slicer" kata

ok thanks, this is fixed

• ###### Filip Hermanscommented on "Pizza Slicer" kata

you're right, is fixed now thanks

• ###### ZED.CWTcreated an issue for "Pizza Slicer" kata

Sample Tests expect wrong results

``````BigInteger.valueOf(3), BigInteger.valueOf(4)), new BigInteger[]{BigInteger.valueOf(2), BigInteger.valueOf(4), BigInteger.valueOf(32)}

3/4 != 1/2 + 1/4 + 1/32

BigInteger.valueOf(4), BigInteger.valueOf(6)), new BigInteger[]{BigInteger.valueOf(2), BigInteger.valueOf(6), BigInteger.valueOf(72)}

4/6 != 1/2 + 1/6 + 1/72

``````
• ###### ZED.CWTcreated an issue for "Pizza Slicer" kata

Tests expect `BigInteger[]` but initial code is `public static List<BigInteger>`

Hi,

Ok thanks