Rosetta Code:Village Pump/Suggest a programming task: Difference between revisions
Content added Content deleted
(→Partitioning: added a comment (and link) to a task just entered addressing this request for a new task.) |
No edit summary |
||
Line 741: | Line 741: | ||
== Partitioning == |
== Partitioning == |
||
Task for "partition an integer into X primes". For example, partition 19 into 3 primes could return 3+5+11. |
Task for "partition an integer into X primes". For example, partition 19 into 3 primes could return 3+5+11. |
||
== Weighted Random == |
|||
Pick a random item from a list of dozen items, where each item has different weight (rarity). |
|||
Gaming example: random treasure generation in roguelikes. I've found that this is extremely awkward to do in some languages, and simple in others. |
|||
<br> |
<br> |