Combinations: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: Added type signature, improved aesthetics) |
m (Spelling/grammar/aesthetics.) |
||
Line 1: | Line 1: | ||
⚫ | |||
{{task}} |
|||
⚫ | |||
⚫ | |||
in sorted order (each combination is sorted and the entire table is sorted). |
|||
⚫ | |||
Line 17: | Line 14: | ||
2 3 4 |
2 3 4 |
||
If it is more "natural" in your language to start counting from<tt> |
If it is more "natural" in your language to start counting from <tt>1</tt> instead of <tt>0</tt> the combinations can be of the integers from <tt>1</tt> to <tt>n</tt>. |
||
=={{header|Haskell}}== |
=={{header|Haskell}}== |
||
Line 55: | Line 52: | ||
) |
) |
||
The<tt> |
The <tt>M.</tt> uses memoization which greatly reduces the running time. |