Search:

Type: Posts; User: S0ULphIRE

Search: Search took 0.35 seconds.

  1. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  2. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  3. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  4. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  5. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  6. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  7. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  8. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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.
  9. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  10. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  11. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  12. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  13. Replies
    33
    Views
    4,637

    Re: Modifying "Coin change" program

    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...
  14. Replies
    33
    Views
    4,637

    Modifying "Coin change" program

    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:...
Results 1 to 14 of 14