• ###### darkkeepercommented on "Subtract the Sum" kata

Adding a sample test would make this easier to understand. Otherwise it's a good kata.

• ###### VadKozJrcommented on "Subtract the Sum" kata

Funny, thanks))

• ###### lbvf50mobilecommented on "Subtract the Sum" kata

Very nice. I had a lot of fun. But it is not 8ku, it's at least 7ku.
Thank you

• ###### lbvf50mobilecommented on "Unknown Amount of Missing Numbers in an Unordered Array. (Hardcore version)" kata

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

• ###### lbvf50mobilecommented on "Unknown Amount of Missing Numbers in an Unordered Array. (Hardcore version)" kata

Hey guys.

I solve this kata for 3 days, even wrote environment on local machine for testing. Create several solutions but they are to heavy.
Please give me tiny advise about direction, is it "disjoint sets"?

I do not want to open solutions, want to solve it myself. But looks like I need some advice.

Thank you.

• ###### Chrono79commented on "Birthday I - Cake" kata

You're welcome.

• ###### lbvf50mobilecommented on "Birthday I - Cake" kata

@Chrono79 Thank you a lot. I solved it.
Really appriciate for you help.

• ###### lbvf50mobilecommented on "Birthday I - Cake" kata

I think I start undestand. Hm.

• ###### lbvf50mobilecommented on "Birthday I - Cake" kata

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

• ###### Chrono79commented on "Birthday I - Cake" kata

The value of each letter depends on its position in the string. In this case b is 98, not 2, and so on. Read the part of the instructions I copied again.

character code of each even indexed character

alphabetical position of each odd indexed character

The index refers to the index in the string, and it starts at 0, so the first char is even indexed.

• ###### lbvf50mobilecommented on "Birthday I - Cake" kata

It's still buggy. Take a look at the exmpale: `b is 2`
In your code `b is 98`

``````b: 2
s: 115
l: 12
l: 12
x: 24
m: 109
v: 22
l: 12
l: 12
p: 16
k: 107
total: 443
{:candles=>964, :debris=>"bsllxmvllpk", "debris number"=>443, "candles * 0.7"=>674.8}
That was close!: 443 < 674.8
``````

It should work for random inputs too - Expected: "Fire!", instead got: "That was close!"

• ###### yellowBunnycommented on "Birthday I - Cake" kata

Done thanks for response

• ###### Chrono79commented on "Birthday I - Cake" kata

You will work out the number of candles that will fall from the provided string (y). You must add up the character code of each even indexed character in y, with the alphabetical position of each odd indexed character in y to give the string a total.

example: 'abc' --> a=97, b=2, c=99 --> y total = 198.

alphabetical position
a = 1, b = 2, c = 3, etc.

why b = 2 ??

• ###### Chrono79resolved an issue on "Birthday I - Cake" kata

Debris number is wrong, for that string it should be 341.

You will work out the number of candles that will fall from the provided string (y). You must add up the character code of each even indexed character in y, with the alphabetical position of each odd indexed character in y to give the string a total.

example: 'abc' --> a=97, b=2, c=99 --> y total = 198.

``````u = 117
s = 19
b = 98
c = 3
h = 104
total = 341
``````