Timeline for Cut a list of length `n` into even number `m` of adjacent sublists of odd length in all possible ways?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 2, 2017 at 23:41 | comment | added | David G. Stork | Elegant... +1.. | |
May 2, 2017 at 23:10 | comment | added | kglr |
@Kagaratsch, if you still want to have each sublist to have an odd length, you don't have to change anything (m could be even or odd). If you want to have each sublist to have even length, use Range[2, Length@lst, 2] instead of Range[1, Length@lst, 2] .
|
|
May 2, 2017 at 23:01 | comment | added | Kagaratsch |
what should I change if I want to switch m from even to odd?
|
|
May 2, 2017 at 22:11 | comment | added | kglr | @Kagaratsch, thank you for the accept. | |
May 2, 2017 at 22:11 | history | edited | kglr | CC BY-SA 3.0 |
deleted 1 character in body
|
May 2, 2017 at 21:48 | comment | added | Kagaratsch | This is amazingly short, thank you! | |
May 2, 2017 at 21:48 | vote | accept | Kagaratsch | ||
May 2, 2017 at 21:02 | history | answered | kglr | CC BY-SA 3.0 |