SeqJoin/abatueva | SeqJoin/Stef-Fun | ||||
---|---|---|---|---|---|
t | 1 | def joinseq(*seqs): | t | 1 | def joinseq(*seqs): |
2 | seqs = [list(seq) for seq in seqs] | 2 | seqs = [list(seq) for seq in seqs] | ||
3 | while seqs: | 3 | while seqs: | ||
4 | seqs = sorted(seqs) | 4 | seqs = sorted(seqs) | ||
5 | while seqs and (not seqs[0]): | 5 | while seqs and (not seqs[0]): | ||
6 | seqs = seqs[1:] | 6 | seqs = seqs[1:] | ||
7 | if seqs: | 7 | if seqs: | ||
8 | yield seqs[0][0] | 8 | yield seqs[0][0] | ||
9 | seqs[0] = seqs[0][1:] | 9 | seqs[0] = seqs[0][1:] |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|