These are chat archives for Codewars/codewars.com/kata-solving-help

5th
Nov 2016
Giacomo Sorbi
@GiacomoSorbi
Nov 05 2016 07:59

it is just I was like stuck for like 3 to 4 days on that problem and it was literally driving me insane

It happens to fall in love with a kata, once in a while ;)

damjan
@dpolugic
Nov 05 2016 11:52
@docgunthrop Yeah, I just solved it. What are you having trouble with?
damjan
@dpolugic
Nov 05 2016 12:02
The naive approach is to just use function calls, like john(n) = n - ann(john(n-1)). The problem here is partly that you'll soon hit the recursion limit, and partly that you aren't storing the result of your calculations (meaning you'll end up having to repeat a lot of work). Do you have any ideas about how one might solve these problems?
(well, not exactly like that example since we need to return a list, but you know what I mean)
EK
@docgunthrop
Nov 05 2016 15:49
@dpolugic that was my initial approach, but for some reason, though I was getting the correct sequence for Ann, I was getting an incorrect sequence for John
I'll probably get back to it again later
damjan
@dpolugic
Nov 05 2016 16:37
Alright. You can send me a PM if you want me to help you find the bug. :)
Keomony
@Freezing_Sky_twitter
Nov 05 2016 18:01
hi , I got an error while trying to solve this problem
in ruby
STDERR:
block in describe': Wrong a (Test::Error) frommeasure'
from describe' fromblock in
'
from each' fromeach_with_index'
from `
i passed the first test,
can anyone help ?
EK
@docgunthrop
Nov 05 2016 19:33
@dpolugic thanks, I'll probably take another shot at it again in a day or two. If I still have issues, I'll send you a PM