In article <52f80bca0ドル29972ドル$c3e8da3$5496439d at news.astraweb.com>, Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote: > On 2014年2月09日 10:05:02 -0500, Roy Smith wrote: >> > Is this a homework problem? >> and then (paraphrasing): >> > working code that solves the problem >> /headdesk I gave him the benefit of the doubt. Also, as I look at my solution, I realize it doesn't really meet the O(1) space requirement. Understanding why is left as an exercise for the reader :-)