Solve hanging lantern problem: Difference between revisions

Content added Content deleted
(→‎{{header|Phix}}: added a full solution)
m (→‎{{header|Raku}}: removed header markup)
Line 560: Line 560:
Rather than take the number of columns as an explicit argument, this program infers the number from the size of the array of columns passed in.
Rather than take the number of columns as an explicit argument, this program infers the number from the size of the array of columns passed in.


==={{header|Sequence as columns}}===
===Sequence as columns===
The verbose mode of this version outputs the sequence of columns to remove lanterns from, rather than numbering the lanterns individually as in the description:
The verbose mode of this version outputs the sequence of columns to remove lanterns from, rather than numbering the lanterns individually as in the description:


Line 600: Line 600:
[3,3,3,2,2,1]</pre>
[3,3,3,2,2,1]</pre>


==={{header|Sequence as lanterns}}===
===Sequence as lanterns===
This longer version numbers the lanterns as in the example in the task description.
This longer version numbers the lanterns as in the example in the task description.