Talk:Count the coins/0-1: Difference between revisions

Content added Content deleted
(Algo?)
(Several problems with the task as written)
Line 9: Line 9:
==Algorithm==
==Algorithm==
Can you show an algorithm? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:09, 6 January 2021 (UTC)
Can you show an algorithm? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:09, 6 January 2021 (UTC)

==Several problems==

# What this task is asking for is a duplicate of [[Combinations]], only different in that it is asking for a count of combinations that have some property rather than an enumeration of combinations. In Raku the task would literally be:<br><code>say +[1, 2, 3, 4, 5].combinations.grep: *.sum == 6</code>
# Order matters; Do you mean 1 + 5 is not the same as 5 + 1? Or do you mean that each coin of the same denomination should be treated separately? (''This'' 1 unit coin is different from ''that'' 1 unit coin.) If that is the case there needs to be something that makes them unique.
# 'Count the coins' is a poor name for the task anyway, especially if you are going to have a restriction that order matters. By definition order doesn't matter when making change.

--[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 11:13, 6 January 2021 (UTC)