Redirecting to
NADOS
- Permutation - 1
- Permutations - 2
- Combinations - 1
- Combinations - 2
- Queens Permutations - 2d As 2d - Queen Chooses
- Queens Combinations - 2d As 2d - Box Chooses
- Queens Permutations - 2d As 2d - Box Chooses
- Queens Combinations - 2d As 2d - Queen Chooses
- Queens Combinations - 2d As 1d - Queen Chooses
- Nqueens Permutations - 2d As 1d - Queen Chooses
- Nqueens Combinations - 2d As 1d - Queen Chooses
- N Queens - Branch And Bound
- Nknights Combinations - 2d As 1d - Knight Chooses
- Permutations - Words - 1
- Permutations - Words - 2
- Words - K Selection - 1
- Words - K Selection - 2
- Words - K Selection - 3
- Words - K Selection - 4
- Words - K Length Words - 1
- Words - K Length Words - 2
- Words - K Length Words - 3
- Words - K Length Words - 4
- Coin Change - Combinations - 1
- Coin Change - Combinations - 2
- Coin Change - Permutations - 1
- Coin Change - Permutations - 2
- Solve Sudoku
- Crossword Puzzle
- Cryptarithmetic
- Gold Mine - 2
- Josephus Problem
- Lexicographical Numbers
- Friends Pairing - 2
- K-partitions
- K Subsets With Equal Sum
- Abbreviation Using Backtracking
- Max Score
- All Palindromic Permutations
- All Palindromic Partitions
- Pattern Matching
- Word Break - I
- Remove Invalid Parenthesis
- Tug Of War
- Largest Number Possible After At Most K Swaps
- Magnets
- Abbreviations using Backtracking
- Max Score
- N Queens Branch and Bound
- Josephus Problem
- Permutations - 1
- Lexicographical Numbers
- Gold Mine - 2
- Maximum Number After K Swaps
- K Length Words-3
- Permutations - 2
- Coin Change Combination-2
- Combinations - 1
- Friends Pairing - 2
- Remove Invalid Parentheses
- Sudoku Solver
- Word break-1
- Words - K Selection - 2
- Tug Of War
- K Subsets with Equal Sum
- Combinations - 2
- Nqueens Combinations - 2d As 1d - Queen Chooses
- Queens Combinations - 2d As 1d - Queen Chooses
- Cryptarithmetic
- Coin change combination-1
- Coin Change Permutations-2
- Coin Change Permutations-1
- K - Partitions
- All Palindromic Partitions
- Queens Combinations - 2d As 2d - Box Chooses
- Queens Permutations - 2d As 2d - Queen Chooses
- Queens Permutations - 2d As 2d - Box Chooses
- Queens Combinations - 2d As 2d - Queen Chooses
- Nknights Combinations - 2d As 1d - Knight Chooses
- Nqueens Permutations - 2d As 1d - Queen Chooses
- Permutations words-1
- Permutations Words-2
- Words - K Selection - 1
- Words-k length words-1
- Words-K Length Words-2
- Words - K Selection - 3
- Words - K Selection - 4
- Words-K Length Words-4
Coin Change - Permutations - 1
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.1. You are given a number n, representing the count of coins.Input Format
2. You are given n numbers, representing the denominations of n coins.
3. You are given a number "amt".
4. You are required to calculate and print the permutations of the n coins (non-duplicate) using which the amount "amt" can be paid.
Note -> Use the code snippet and follow the algorithm discussed in question video. The judge can't force you but the intention is to teach a concept. Play in spirit of the question.
A number nOutput Format
n1
n2
.. n number of elements
A number amt
Check the sample output and question videoQuestion Video Constraints
1 <= n <= 30Sample Input
0 <= n1, n2, .. n elements <= 20
0 <= amt <= 50
5Sample Output
2
3
5
6
7
12
2-3-7-.
2-7-3-.
3-2-7-.
3-7-2-.
5-7-.
7-2-3-.
7-3-2-.
7-5-.
-
Asked in Companies
-
Related Topics
Your profile is incomplete!
Please click here to complete your profile to continue submitting questions.
Video Solution
Code Solution
{ }
Editor Settings
Font Size
Key Binding
Keyboard Shortcut
- fold Alt-L|Ctrl-F1
- unfold Alt-Shift-L|Ctrl-Shift-F1
- Gotoend Ctrl-End
- Gotostart Ctrl-Home
- Movelinesup Alt-Up
- Movelinesdown Alt-Down
- Undo Ctrl-Z
- Redo Ctrl-Shift-Z|Ctrl-Y
- Replace Ctrl-H
- Togglecomment Ctrl-/
- ToggleBlockComment Ctrl-Shift-/
- Removeline Ctrl-D
{ }
Run
Editor Settings
Font Size
Key Binding
Keyboard Shortcut
- fold Alt-L|Ctrl-F1
- unfold Alt-Shift-L|Ctrl-Shift-F1
- Gotoend Ctrl-End
- Gotostart Ctrl-Home
- Movelinesup Alt-Up
- Movelinesdown Alt-Down
- Undo Ctrl-Z
- Redo Ctrl-Shift-Z|Ctrl-Y
- Replace Ctrl-H
- Togglecomment Ctrl-/
- ToggleBlockComment Ctrl-Shift-/
- Removeline Ctrl-D