Historical forum-msg-id-130871-edit, Revision 2

Original date:2017-03-20 15:34:47 Edited by: petelomax Subject: Re: rosettacode 500 milestone passed

Spock said...

I note the CPP version is described as "Initially taken from C but than fixed and refactored". Does that mean some subtle bug still lurks in the C version? The CPP version is also 3 times longer than the one in C. I didn't realise that "refactor" actually means to make longer.

I checked the history and found this: http://rosettacode.org/mw/index.php?title=Knapsack_problem/Bounded&diff=220921&oldid=219546

It seems the C++ version is based on a very different C version to the current one and hence that comment no longer applies.
I have added an appropriate comment to that page.

Still playing with the full-on recursive version, I've got an idea about caching ranges.


Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu