Skip to content

Commit f5f088e

Browse files
Update Coin Change Readme.md
1 parent 499ad00 commit f5f088e

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

Competitive Coding/Dynamic Programming/Coin Change/Coin Change Readme.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
Problem :-
2+
===
23
Given a value N and the values of different denomination,find the number of ways to make changes for N cents,if we have infinite supply of all denominations.
34

4-
Input : Size of an array and all the values in the array and the number of cents.
5-
6-
Output : An integer that denotes the number of ways to make change.
7-
8-
Language : C++
9-
10-
Algorithm Paradigm : Dynamic Programming
11-
12-
Time Complexity : O(N*M)
13-
14-
Space Complexity : O(N*M)
15-
5+
Input:-
6+
---
7+
Size of an array and all the values in the array and the number of cents.
8+
9+
Output :-
10+
---
11+
An integer that denotes the number of ways to make change.
12+
13+
Language : **C++**
14+
---
15+
Algorithm Paradigm : **Dynamic Programming**
16+
---
17+
Time Complexity : **O(N*M)**
18+
---
19+
Space Complexity : **O(N*M)**
20+
---
1621
Working :-
17-
22+
---
1823
An arr array stores the different currency values.
1924
Another array temp stores the best values for sub-problems.For eg: temp[3][4] stores the optimal value for the number of ways
2025
to make change if the number of cents(N) were 4 and we only had arr[0],arr[1] and arr[2] as the different values of currency.

0 commit comments

Comments
 (0)