Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Slowest sort you can think

Name: Anonymous 2012-07-22 3:02

What's the slowest non-Bogosort sort you can think of?

For me, it's
- Compute all the n! permutations of the list
- Do a breadth first search of the ordered permutation.
which, if done right, can be O(n*n!logn!).

Name: Anonymous 2012-07-22 14:04

>>18
Here, for Python:
# heron: make a mess out of your lists
heron = lambda: ((lambda f: f(f, set(), globals(), __import__('random').shuffle))(lambda heron, s, w, shuffle: ([(lambda v: ((s.add(id(v)), heron(heron, s, v, shuffle), shuffle(v) if isinstance(v, list) else None,) if isinstance(v, (dict, list, tuple, set)) and id(v) not in s else None, (s.add(id(v.__dict__)), heron(heron, s, v.__dict__, shuffle),) if getattr(v, '__dict__', None) and id(v.__dict__) not in s else None,))(p) for p in (w.values() if isinstance(w, dict) else w) if isinstance(w, (dict, list, tuple, set))],)), None,)[-1]

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List