Sort one sequence by O(n) in time and O(1) in space

Roy Smith roy at panix.com
Sun Feb 9 19:15:38 EST 2014


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 :-)


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /