There's always a 1, so it's always solvable. So your example would grab 5,5,3,1.
I just re-read the thread, especially page 1. I pointed out what I didn't understand at every point that you...
Type: Posts; User: S0ULphIRE
There's always a 1, so it's always solvable. So your example would grab 5,5,3,1.
I just re-read the thread, especially page 1. I pointed out what I didn't understand at every point that you...
Oh yeah I can write what I wrote in c++ for java in a few minutes, but as I said that's just a bog standard GA.
I'll have a go at writing it in Java again, got more free time now that I'm not the...
Man that's cool lol, not only do you not help, but any answer which contains the code I'm looking for you'll actually delete and vote to ban the user? Wow...
You seem to think this is homework. On...
I don't keep failed code blocks around to post up later, here's the last modification I'd tried.
public static int dynTable(int[] shimArray, int cutSize, String temp){
if (cutSize...
Yep, this is for cutting custom metal sheets on an old guillotine. There's a ton of different sizes and it goes down to some pretty small values. There's also more than one machine but only one set...
Might seem easy to you but it isn't to me.
You're right, doing my work for me wouldn't be helping. Because that wouldn't involve programming, as that's not my work. I figured I might get some java...
Yeah except if you think about what I said before it'll make sense now. The way it's solved is by calculating all values below the sum via trial and error and keeping the results. At the end, compare...
Yep lowest number of coins. If you reckon it's not extremely difficult, then help me and show me how you'd write it! :D
If not, then no worries.
Haha apparently programming classes were much more hardcore back in the day, unless you're thinking of a Greedy algorithm? In which case yeah that's super easy, but that won't work for me, I have...
Thought about that. I believe the way this works is the Hashtable is filled with all the solutions under the desired amount, so at many points a value (not necessarily the right value) is being...
I'm teaching myself, and only started a little while ago. I've *heard* dynamic programming is pretty difficult, and from my experiences with doing exactly what you suggested I'd tend to agree. Sorry...
Ok, so where would I implement the Coin Object? Lets simplify this, I'll just return coin values not number of coins required. How do I get those coin values and return them? I don't know at which...
I'll return it as an array, last entry will always be total number required, other elements will be coin values needed. HashMap just because Hashtable is old :p, tbh I haven't got the slightest grasp...
Hey all, time for some dynamic programming! I've tried and failed, apparently I still don't understand the concept well enough to modify this the way I want.
Code I'm working with is from here:...