Timeline for Lexicographically Smallest Decreasing Integer Partition
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 8, 2022 at 8:57 | history | edited | att | CC BY-SA 4.0 |
added 228 characters in body
|
Mar 8, 2022 at 8:28 | comment | added | att |
@theorist I agree on (1), but I felt it was interesting enough to leave be. As for (2), I'm fairly liberal with list output formats, since pretty much any expression with arguments can be interpreted as one; StringJoin is nice to use since it's Flat and <> is short. I do consider List and Sequence to be more "pure" though; we can convert it into Sequence output for 41 bytes.
|
|
Mar 8, 2022 at 6:53 | comment | added | theorist |
(1) Since the OP asks for a "strictly decreasing array", I think your output for Last@Pick[s=Subsets@Range@#,Tr/@s,#]& needs to be reversed. (2) I didn't know it was permitted to provide an answer in the functional form you gave with f@n_:=#<>f[n-#]&@Round@√(2n) f@0="" , so that's good to know. But I don't know whether a StringJoin of integers qualifies as an array.
|
|
Mar 8, 2022 at 3:20 | history | edited | att | CC BY-SA 4.0 |
added 447 characters in body
|
Mar 7, 2022 at 17:42 | history | answered | att | CC BY-SA 4.0 |