Anonymous user
Best shuffle: Difference between revisions
→Swap if it is locally better algorithm: Task description dictates output format
(→Swap if it is locally better algorithm: while loop not needed.) |
(→Swap if it is locally better algorithm: Task description dictates output format) |
||
Line 1,239:
for w in test_words:
w2, c = best_shuffle(w)
print("%29s,
;Sample output
Line 1,245:
<pre>>>> ================================ RESTART ================================
>>>
tree,
abracadabra,
seesaw,
elk,
grrrrrr,
up,
a,
antidisestablishmentarianism,
hounddogs,
aardvarks are ant eaters,
immediately,
abba,
>>> ================================ RESTART ================================
>>>
tree,
abracadabra,
seesaw,
elk,
grrrrrr,
up,
a,
antidisestablishmentarianism,
hounddogs,
aardvarks are ant eaters,
immediately,
abba,
>>> ================================ RESTART ================================
>>>
tree,
abracadabra,
seesaw,
elk,
grrrrrr,
up,
a,
antidisestablishmentarianism,
hounddogs,
aardvarks are ant eaters,
immediately,
abba,
>>> </pre>
|