Dennis Lee Bieber <wlfraed at ix.netcom.com> writes: > Why bother with seen ? The version with seen runs in linear time because of the O(1) set lookup. Your version runs in quadratic time.