0

What is the time complexity of heaps law of permutations?

Don't explain heap sort.

26th Jul 2020, 7:05 AM
Wasi
Wasi - avatar
2 Respostas
0
Jan Markus i couldn't get the last few lines
26th Jul 2020, 7:10 AM
Wasi
Wasi - avatar
0
def generate(l,a): if l ==1 : print(*a) else: for i in range(l): generate(l-1,a) if i % 2==0: a[i],a[l-1] = a[l-1],a[i] else: a[0],a[l-1] = a[l-1],a[0] generate(3,[1,2,3]) Can you brak this down pls
26th Jul 2020, 8:44 AM
Wasi
Wasi - avatar