Index finite lists of positive integers: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: changed/added comments and whitespace, changed indentations.) |
m (added whitespace before the TOC (table of contents).) |
||
Line 7: | Line 7: | ||
* write a function ''unrank'' which is ''rank'' 's [[wp:inverse function|inverse function]]. |
* write a function ''unrank'' which is ''rank'' 's [[wp:inverse function|inverse function]]. |
||
Demonstrate your solution by picking a random-length list of random positive integers, turn it into an integer and get the list back. |
<br>Demonstrate your solution by picking a random-length list of random positive integers, turn it into an integer and get the list back. |
||
There are many ways to do this. Feel free to choose any one you like. |
There are many ways to do this. Feel free to choose any one you like. |
||
Line 14: | Line 14: | ||
Make rank as a [[wp:bijection|bijection]] and show unrank(n) for n varying from 0 to 10. |
Make rank as a [[wp:bijection|bijection]] and show unrank(n) for n varying from 0 to 10. |
||
Mbr.<br> |
|||
=={{header|D}}== |
=={{header|D}}== |