Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8221877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:05:18+00:00 2026-06-07T14:05:18+00:00

I am given an amount say $50. I am given some denominations say $1

  • 0

I am given an amount say $50.
I am given some denominations say $1 ,$2 ,$5 etc. and the number of these denominations eg 1 ,5,6 that means 1 coin/note of $1 ,5 coins/notes of $2 and 6 coins/notes of $5.
I have to find the number of ways these coins can be used to form this amount $50.
I am trying to think an efficient algorithm to solve this in the fastest time possible.
Please note here the amount will never exceed $60.

Can someone please suggest which algorithm I can use to solve this problem?
Till now I have written a recursive solution for this problem but it is too slow for my purpose.I will be posting it here soon.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:05:20+00:00Added an answer on June 7, 2026 at 2:05 pm

    I agree that this is not the place for homework, but still… The asker does not expect to get solution, he is only asking for a direction. let’s not keep questions open unecessarily

    Have a look at Integer factorization

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have some code: setInterval(foo,1000); // here is an interval that causes a
I'm currently generating the amount of time given the number of seconds. This is
I have a table recording the amount of data transferred by a given service
Given that the web application doesn't have su privileges, I'd like to execute a
Let's say I have a 4-core CPU, and I want to run some process
Say I have an array of thousands of objects, and a small number of
Let's say I'm getting a large (2 million rows?) amount of data that's supposed
Say I have a list of 10,000 lines of string that needs to be
I have a PostgreSQL table with some doubles, they store precentages. so let's say
Alright. So I have a very large amount of binary data (let's say, 10GB)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.