about | help | code help+videos | done | prefs |
changes
More change we can believe in! This exercise is just like the previous exercise, change, except that instead of returning the number of different ways to make change, the function changes(amt) returns a list of the different ways. For example, changes(10) should return [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 5], [5, 5], [10]]. The list should be in sorted order, as should each element of the list. changes(10) → [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 5], [5, 5], [10]] changes(0) → [[]] changes(4) → [[1, 1, 1, 1]] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 501 Post-solution available
Copyright Nick Parlante 2017 - privacy