Talk:Solve hanging lantern problem: Difference between revisions
Content added Content deleted
(Add comment about multiple columns with the same number of lanterns.) |
(Fixed Julia based on comment.) |
||
Line 1:
The Julia solution
-- [[User:Markjreed|Markjreed]] ([[User talk:Markjreed|talk]]) 21:24, 22 May 2022 (UTC)
|
Revision as of 21:37, 22 May 2022
The Julia solution considered two columns with the same number of lanterns indistinguishable, and therefore output a total of only 7 sequences when given 3 columns of 1, 3, and 3 lanterns. Since the problem statement gives an example in which each lantern is individually numbered, I infer that columns with the same number of lanterns should not be interchangeable and 3 columns [1,3,3] should yield 140 distinct sequences. I have edited the Julia solution to match this interpretation, and based a Raku solution on it. But perhaps some more clarity and/or some examples in the problem statement are called for. -- Markjreed (talk) 21:24, 22 May 2022 (UTC)