On Sun, Dec 19, 2010 at 5:59 AM, Vito 'ZeD' De Tullio
<zak.mc.kra...@libero.it> wrote:
> Steven D'Aprano wrote:
>
>> I can't see any way to go from this linked list:
>>
>> node1 -> node2 -> node3 -> node4 -> node5 -> node6 -> node7
>>
>> to this:
>>
>> node1 -> node6 -> node5 -> node4 -> node3 -> node2 -> node7
>>
>> in constant time. You have to touch each of the nodes being reversed.
>
> very crude example: [SNIPPED]


That reverses the whole list.  How does it help with reversing only
part of the list, as in Steven's example?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to