List rooted trees: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: added the REXX computer programming language.) |
m (→{{header|REXX}}: added wording to the REXX section header about nomenclature used in the program.) |
||
Line 1,042: | Line 1,042: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
This REXX version uses (internally) a binary string to represent nodes on a tree (<big>'''0'''</big> is a left parenthesis, <big>'''1'''</big> is a right parenthesis). A <big>'''()'''</big> is translated to a <big>'''O'''</big>. |
|||
<lang rexx>/*REXX program lists n─node rooted trees (by enumerating all ways of nesting N bato).*/ |
<lang rexx>/*REXX program lists n─node rooted trees (by enumerating all ways of nesting N bato).*/ |
||
parse arg N . /*obtain optional argument from the CL.*/ |
parse arg N . /*obtain optional argument from the CL.*/ |