Neoalgo: Print the number of ways the amount N can be represented by the given coin using DP

Created on 16 Aug 2020  路  15Comments  路  Source: TesseractCoding/NeoAlgo

馃殌 Description

Program should be implemented using Dynamic Programming

Program should do

Given a value N, if we want to make a change for N cents, and we have an infinite supply of each of S = { S1, S2, .., Sm} valued coins, how many ways can we make the change?
The order of coins doesn鈥檛 matter.

Sample Test Case

Input:

N = 4
S = {1,2,3}

Explanation

there are four solutions: {1,1,1,1},{1,1,2},{2,2},{1,3}

Output

4

Input

N = 10
S = {2, 5, 3, 6}

Explanation

there are five solutions: {2,2,2,2,2}, {2,2,3,3}, {2,2,6}, {2,3,5} and {5,5}

Output

5

Have you read the Contributing Guidelines on Pull Requests?

Please make sure that you have read the Contributing Guideline

Thanks!

Happy Coding!

Programming Languages For Implementations:

  • C++ -
  • Python - @diyajaiswal11
  • C - @diyajaiswal11
  • GO - odavhad
  • Java - @Kritika37
C C-Plus-Plus CH20 Go Java Python hard no-issue-activity

All 15 comments

@plazzy99 I'm interested in solving this issue in C and Python. Please assign this to me.

I want to work on it in C++ @plazzy99

@diyajaiswal11 go ahead with C and python

Hope you have gone through the contribution guidelines

Happy Coding!

@Joshitha18 please wait for your opened pr to merge
You will be assigned soon

i would like to work on this in java or C++

@Kritika37 go ahead with java

Hope you have gone through the contribution guidelines

Happy Coding!

@Kritika37 go ahead with java

Hope you have gone through the contribution guidelines

Happy Coding!

Hey there was some problem but i solved it. By mistake, I removed my assignment. Please reassign it @plazzy99

I would like to contribute in Golang

I would like to contribute in Golang

@odavhad go with golang

Would like to do this in C++ kindly assign me this issue @Kajol-Kumari @SKAUL05

@yashaswibiyahut You are already working on two issues. Make a PR for them before you move forward with next issues.

@plazzy99 can I take this in Java if the assignee is not working on it?

@plazzy99 can I take this in Java if the assignee is not working on it?

Hey I have already completed the code, I have to just remove the conflict and merge. @ritvij14

@iamrajiv Can you please assign this to me in C++

Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Telegram or ping one of the reviewers. Thank you for your contributions!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HarshCasper picture HarshCasper  路  9Comments

Joshitha18 picture Joshitha18  路  7Comments

DrSehgal7 picture DrSehgal7  路  10Comments

shivangi00 picture shivangi00  路  7Comments

SayaniG371 picture SayaniG371  路  9Comments