Factorial base numbers indexing permutations of a collection: Difference between revisions
Content deleted Content added
m →{{header|zkl}}: play with formatting |
→{{header|Go}}: Approx. 30% speed-up for 'count only' scenario. |
||
Line 152: | Line 152: | ||
for n := 0; ; n++ { |
for n := 0; ; n++ { |
||
radix := 2 |
radix := 2 |
||
res |
var res []int = nil |
||
if !countOnly { |
|||
res = make([]int, size) |
|||
} |
|||
k := n |
k := n |
||
for k > 0 { |
for k > 0 { |