> That's easy to follow, although their use of a Van Emde-Boas set as a > given hides the most challenging part (the "efficient data structure" > part).
The "efficient data structure" is the easy part. Obviously, it is a dict of lists. ...or is it a list of dicts?... ...or is it a tuple of generators?... Anyway, "being aware of the literature", "thinking", "being smart", and "being Tim Peters" are all forms of cheating. I prefer not to cheat. ;) nOOm, I still need an answer... > also, what do you consider to be the correct output for this > permutation? (according to your original question) > > [4, 5, 1, 2, 3, 6, 7, 8] Manuel -- http://mail.python.org/mailman/listinfo/python-list