[Tutor] Intermediate/advanced concepts

Kent Johnson kent37 at tds.net
Fri Nov 7 12:57:38 CET 2008


On Fri, Nov 7, 2008 at 4:12 AM, Alan Gauld <alan.gauld at btinternet.com> wrote:
> For example a linked list is
> pretty much a Python list.

Other than the very different timing characteristics! Python lists are
O(1) for reading or writing a value at an index, O(n) for inserting
and deleting. Linked lists are O(n) for reading and writing and O(1)
for insertion and deletion (at a known location).

Kent


More information about the Tutor mailing list