coin change problem
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: coin change problem

  1. #1
    Join Date
    Apr 2014
    Posts
    5

    coin change problem

    Illustrate the execution of the Coin Change algorithm on n = 10 in the system of denominations d(1) = 1, d(2) = 5, and d(3) = 8.

    so i have n = 10 with denominations of d(1) = 1, d(2) = 5, d(3) = 8
    so the execution of the coin problem will be: 1 * 1 + 2 * 5 + 3 * 8

    so it will be using 2 nickels of 5. is this right or am i doing something wrong.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,353

    Re: coin change problem

    Yes, "2 nickels of 5" is less than for example "1 of 8 plus 2 of 1".
    However, I don't see any algorithm in your OP.
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center